From 7e70e56b3f78100196d55d518d39afc993f0af32 Mon Sep 17 00:00:00 2001 From: Gerard Patel Date: Sun, 23 Jan 2000 03:20:19 +0000 Subject: [PATCH] Map WM_MENUSELECT 32->16 bits for closing menu. --- windows/winproc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/windows/winproc.c b/windows/winproc.c index 196f6937a40..9188dfe29b5 100644 --- a/windows/winproc.c +++ b/windows/winproc.c @@ -1796,7 +1796,11 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32, if(HIWORD(wParam32) & MF_POPUP) { UINT16 hmenu; - if((hmenu = GetSubMenu((HMENU16)*plparam, *pwparam16))) *pwparam16=hmenu; + if (((UINT)HIWORD(wParam32) != 0xFFFF) || (*plparam)) + { + if((hmenu = GetSubMenu((HMENU16)*plparam, *pwparam16))) + *pwparam16=hmenu; + } } /* fall through */ case WM_MENUCHAR: