CWnd::OnMenuSelect 

afx_msg void OnMenuSelect( UINT nItemID, UINT nFlags HMENU hSysMenu );

Parameters

nItemID

Identifies the item selected. If the selected item is a menu item, nItemID contains the menu-item ID. If the selected item contains a pop-up menu, nItemID contains the pop-up menu index, and hSysMenu contains the handle of the main (clicked-on) menu.

nFlags

Contains a combination of the following menu flags:

hSysMenu

If nFlags contains MF_SYSMENU, identifies the menu associated with the message. If nFlags contains MF_POPUP, identifies the handle of the main menu. If nFlags contains neither MF_SYSMENU nor MF_POPUP, it is unused.

Remarks

If the CWnd object is associated with a menu, OnMenuSelect is called by the framework when the user selects a menu item.

If nFlags contains 0xFFFF and hSysMenu contains 0, Windows has closed the menu because the user pressed the ESC key or clicked outside the menu.

Note   This member function is called by the framework to allow your application to handle a Windows message. The parameters passed to your function reflect the parameters received by the framework when the message was received. If you call the base-class implementation of this function, that implementation will use the parameters originally passed with the message and not the parameters you supply to the function.

CWnd OverviewClass MembersHierarchy Chart

See Also   WM_MENUSELECT