Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!samsung!know!daemon From: emcphers@manu.cs.vt.edu (Frank McPherson) Newsgroups: comp.sys.amiga.programmer Subject: Problems with Menu, MenuItem and IntuiText structure declarations Message-ID: <28728@know.pws.bull.com> Date: 8 Jun 91 04:37:50 GMT Sender: daemon@pws.bulL.com Lines: 53 I'm attempting to add a menu to a program I'm in the process of writing. I have run into a problem. I can't get my initializations of those structures past the compiler for some reason. Here's what the declarations look like: struct IntuiText quit_text = { 0,1, /* FrontPen, BackPen */ JAM1, /* DrawMode */ 0,1, /* LeftEdge, TopEdge */ NULL, /* ITextFont */ (UBYTE *) "Quit", /* IText */ NULL /* NextText */ }; struct MenuItem quit_item = { NULL, /* NextItem */ 0,0, /* LeftEdge, TopEdge */ 150,10, /* Width, Height */ (ITEMTEXT| /* Flags */ ITEMENABLED| HIGHNONE), 0L, /* MutualExclude */ (APTR) &quit_text, /* ItemFill */ NULL, /* SelectFill */ NULL, /* Command (keyboard equiv.) */ NULL, /* SubItem */ 0 /* NextSelect */ }; struct Menu project_menu = { NULL, /* NextMenu */ 0,0, /* LeftEdge, TopEdge */ 70,10, /* Width, Height */ MENUENABLED, /* Flags */ (UBYTE *) "Project", /* MenuName */ (APTR) &quit_item /* FirstItem */ }; I'm trying to declare a menustrip with only one menu (called Project) and a single selection (called Quit). Both lines which have (APTR) type casts give me the following error with SAS/C 5.10A: Error 20: invalid constant expression I'm stuck. Any help will be appreciated. Please reply via email to avoid wasting bandwidth with what is probably a silly misake on my part. If you need more of the code in order to help, please ask me for it. Thanks in advance for your help! -- Frank McPherson INTERNET: emcphers@manu.cs.vt.edu --