MM MATCHMNEMONIC


 * 1) define MM_MATCHMNEMONIC 0x01f0

Find match of mnemonic char in menu.

number of submenu levels to search 0 = none 1 = top-level (this menu) 2 = top+first submenu 3 = top+first 2 submenus (etc.) -1 = all
 * mp1 :
 * SHORT1FROMMP(mp1) : character to match
 * SHORT2FROMMP(mp1) :
 * mp2 : pointer to HWND of menu where match found

Returns both the index of the item in the menu that matched and the level of the match : MRFROM2SHORT (hwndmenu, index). In addition, mp2 is updated to contain the window handle of the menu that contained the mnemonic.

This message is sent withing the menu code when the WM_CHAR is being processes and the menu code is trying to find a mnemonic match for the character pressed. This message is not sent to the owner window, so you must subclass the menu window in order to receive this message.

(Source: newsgroup)