Jump to content

MM MENUCHAR: Difference between revisions

From NikiWiki
No edit summary
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
{{DISPLAYTITLE:MM_MENUCHAR}}
  #define MM_MENUCHAR 0x003f
  #define MM_MENUCHAR 0x003f


Line 11: Line 12:
; MRFROM2SHORT(0, 0)        : character is invalid (beep)
; MRFROM2SHORT(0, 0)        : character is invalid (beep)
; MRFROM2SHORT(0, 1)        : cancel the menu
; MRFROM2SHORT(0, 1)        : cancel the menu
; MRFROM2SHORT(position, 2) : select the menu item specified by                               position
; MRFROM2SHORT(position, 2) : select the menu item specified by position


Any other return code means to ignore the character and do nothing.
Any other return code means to ignore the character and do nothing.

Latest revision as of 01:21, 4 January 2020

#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)