RE: MAKEINTRESOURCE revisited
- Posted by Al Getz <Xaxo at aol.com> Apr 28, 2001
- 591 views
Euman wrote: > > > Euman wrote: > > > I'll try this but, Im not sure this is what we should be doing. > > > > Im still not sure what it is you are trying to do. > > > > Are you: > > > > 1. Trying to create a menu in your program and then display it > > and process commands? > > NO, the menu exist already > e.g: > > -- time submenu > IDM_TIME = c_func(CreateMenu, {}) > junk = c_func(AppendMenu, {IDM_TIME, MF_BYPOSITION + MF_STRING <snip> Hi there again Euman, Ok i think i understand what you are trying to do now I'd like to start by offering a hardy congratulations for stumbling upon still yet another one of the many Windows api idoisyncrasies regarding function names. And dont feel bad, ive done the same thing many times. For an even better example, consider MoveFile(), which is used for renaming files also! LoadMenu() loads a menu resource from an .exe or .res file (neither of which you are currently using) into memory. The real point is, however, if you use CreateMenu() then the menu is ALREADY in memory and doesnt need to be loaded. You still have to AppendMenu(), SetMenu() and possibly DrawMenuBar() though. I think SetMenu() is what you are looking for here. Here is a list of menu functions: AppendMenu* CheckMenuItem CheckMenuRadioItem CreateMenu* CreatePopupMenu DeleteMenu DestroyMenu DrawMenuBar* EnableMenuItem GetMenu GetMenuCheckMarkDimensions GetMenuDefaultItem GetMenuItemCount GetMenuItemID GetMenuItemInfo GetMenuItemRect GetMenuState GetMenuString GetSubMenu GetSystemMenu HiliteMenuItem InsertMenu InsertMenuItem IsMenu LoadMenu LoadMenuIndirect MenuItemFromPoint ModifyMenu RemoveMenu SetMenu* SetMenuDefaultItem SetMenuItemBitmaps SetMenuItemInfo TrackPopupMenu TrackPopupMenuEx I've marked essential functions with an asterisk*. Hope this helps some. --Al