MM_MENUCHAR

From NikiWiki
Jump to: navigation, search
#define MM_MENUCHAR 0x003f

Non-mnemonic menu char pressed.

mp1 
window handle of menu currently displayed
mp2 
SHORT1FROMMP(mp2) 
character
SHORT2FROMMP(mp2) 
unused

Returns how PM should deal with this invalid character:

MRFROM2SHORT(0, 0)  
character is invalid (beep)
MRFROM2SHORT(0, 1)  
cancel the menu
MRFROM2SHORT(position, 2) 
select the menu item specified by position

Any other return code means to ignore the character and do nothing. Normally, this message is passed to WinDefWindowProc, which returns 0L.

This message is sent from the menu code to its owner when the WM_CHAR message is being processed, and the alphanumeric key pressed does not match any of the mnemonics in the displayed menu. It allows the application to specify which menu item should be selected in this case.

(Source: newsgroup)