adding functions to submenus
-
I noticed that when you make a new submenu for any of the menus, you can add a function for COMMAND or UPDATE_COMMAND_UI What do these two things mean?
COMMAND handler is called when user clicks on the menu item - you put the real work there. UPDATE_COMMAND_UI is called in response to WM_INITMENUPOPUP, just before displaying the menu. It gives you the opportunity to enable/disable/check/change the text of menu item. If your menu item is always enabled, you don't need UPDATE_COMMAND_UI. Tomasz Sowinski -- http://www.shooltz.com
- It's for protection
- Protection from what? Zee Germans? -
I noticed that when you make a new submenu for any of the menus, you can add a function for COMMAND or UPDATE_COMMAND_UI What do these two things mean?
Not sure if I've understood what your saying properly, but ON_COMMAND is where you tell your class what to do upon receiving that command message and ON_UPDATE_COMMAND is where you tell your class what to do when that menu needs to be updated (in your AFX_MSG_MAP part of your message map) E.g.:
ON_COMMAND(ID_OPTIONS_FONT, OnOptionsFont) ON_UPDATE_COMMAND_UI(ID_OPTIONS_FONT, OnUpdateOptionsFont)
Heres the MSDN info: ON_COMMAND, ON_UPDATE_COMMAND_UI Dylan Kenneally London,UK