Jump to content

MM MATCHMNEMONIC: Difference between revisions

From NikiWiki
No edit summary
 
No edit summary
 
Line 1: Line 1:
 
  #define MM_MATCHMNEMONIC 0x01f0
  #define [[MM_MATCHMNEMONIC]] 0x01f0


Find match of mnemonic char in menu.
Find match of mnemonic char in menu.

Latest revision as of 14:11, 22 January 2004

#define MM_MATCHMNEMONIC 0x01f0

Find match of mnemonic char in menu.

mp1
SHORT1FROMMP(mp1)
character to match
SHORT2FROMMP(mp1)
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
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)