[comp.sys.mac.programmer] Help with resource file in LSC3.0

arbaugh@hqda-ai.ARPA (Bill Arbaugh) (09/09/88)

	I'm new to programming the Mac and I'm having a little
problem with resource files.  I try and GetMenu from my resource
file but all I seem to get is garbage.  I know that the resource
file is there because I can grab the window information.  The
project is named foo and the resource file from RMaker is named foo.rsrc.

Here's the resource MENU definition:

Type MENU
     ,1
     \14

     ,256
     File
     	  Quit
     ,257
     Edit
     	  Undo
     	  (-
     	  Cut
     	  Copy
     	  Paste
     	  Clear


Here's the C code I'm using:

#define APPLE_MENU 1
#define FILE_MENU 256
#define EDIT_MENU 257
#define DRVR 0x44525652L

fill_menus ()
{
     MenuHandle menu;

     menu = GetMenu(APPLE_MENU);
     AddResMenu(menu, DRVR);
     InsertMenu(menu, 0);
     InsertMenu(GetMenu(FILE_MENU), 0);
     InsertMenu(GetMenu(EDIT_MENU), 0);
     DrawMenuBar();
}


     The code is from C Programming Techniques for the Macintosh
by Medniecks.  

     Any help will be appreciated!

     	       	    Thanks, Bill









-- 
==========================================================
Bill Arbaugh			   Phone:  (202) 694-6900
UUCP:  *!uunet!cos!hqda-ai!arbaugh ARPA:  arbaugh@hqda-ai.arpa
==========================================================