windows_programming_notes.nbk: Home | Index | Next Page: WM_MOUSEACTIVATE | Previous Page: WM_MENUCOMMAND
The WM_MENUSELECT message is sent to a menu's owner window when the user selects a menu item.
A window receives this message through its WindowProc function.
LRESULT CALLBACK WindowProc( HWND hwnd, // handle to window UINT uMsg, // WM_MENUSELECT WPARAM wParam, // menu item (UINT) and flags (UINT) LPARAM lParam // handle to menu (HMENU) );
If an application processes this message, it should return zero.
If the high-order word of wParam contains 0xFFFF and the lParam parameter contains NULL, the system has closed the menu.
Do not use the value –1 for the high-order word of wParam, because this value is specified as (UINT) HIWORD(wParam). If the value is 0xFFFF, it would be interpreted as 0x0000FFFF, not –1, because of the cast to a UINT.
Windows NT/2000 or later: Requires Windows NT 3.1 or later. Windows 95/98/Me: Requires Windows 95 or later. Header: Declared in Winuser.h; include Windows.h.
windows_programming_notes.nbk: Home | Index | Next Page: WM_MOUSEACTIVATE | Previous Page: WM_MENUCOMMAND
Notebook exported on Monday, 7 July 2008, 18:56:50 PM Eastern Daylight Time