-
Using menu resource
If you have a compiled menu resource, how can you get at it? I am toying with the idea of a custom menu control, similar to that of ms apps ( eg office 2k ).
It'd be really cool if I could just use a menu resource to make it but I'm unsure about how to get the popup menus and submenus etc ..
-
If you are programming with MFC, a class that might help you is CMenu.
See its methods.
-
-
So check the topic:
SetMenu- Windows User Interface Platform SDK in MSDN
there is a link called Menu Functions
there are all the menu functions.
-
If you want your menu to be custom drawn, you'll have to owner draw it.
-
I don't think we are on the same train of thought, I don't think I explained it well after reading my initial post... sorry.
What I mean is to be able to access the data of the menu which was in the resource script to use in painting and handling events on the menu.
Like, can I enumerate the menus, submenus and menuitems of a menu created in a resource file??
I had a look through MSDN but didn't find anything seemingly relevant.
-
Use LoadMenu to load the menu from the resource file.
Use the GetMenuInfo and GetSubMenu functions to get descendent menus and menu items.
-