diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h index 726ca72663a..6925f334d4f 100644 --- a/dlls/user32/controls.h +++ b/dlls/user32/controls.h @@ -46,6 +46,7 @@ enum builtin_winprocs /* unicode-only procs */ WINPROC_DESKTOP, WINPROC_ICONTITLE, + WINPROC_MENU, NB_BUILTIN_WINPROCS, NB_BUILTIN_AW_WINPROCS = WINPROC_DESKTOP }; @@ -81,6 +82,7 @@ extern const struct builtin_class_descr STATIC_builtin_class DECLSPEC_HIDDEN; extern LRESULT WINAPI DesktopWndProc(HWND,UINT,WPARAM,LPARAM) DECLSPEC_HIDDEN; extern LRESULT WINAPI IconTitleWndProc(HWND,UINT,WPARAM,LPARAM) DECLSPEC_HIDDEN; +extern LRESULT WINAPI PopupMenuWndProc(HWND,UINT,WPARAM,LPARAM) DECLSPEC_HIDDEN; /* Wow handlers */ diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c index 2f0ffc2e5f8..4e03651d72a 100644 --- a/dlls/user32/menu.c +++ b/dlls/user32/menu.c @@ -183,8 +183,6 @@ static HMENU top_popup_hmenu; /* Flag set by EndMenu() to force an exit from menu tracking */ static BOOL fEndMenu = FALSE; -static LRESULT WINAPI PopupMenuWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ); - DWORD WINAPI DrawMenuBarTemp(HWND hwnd, HDC hDC, LPRECT lprect, HMENU hMenu, HFONT hFont); static BOOL SetMenuItemInfo_common( MENUITEM *, const MENUITEMINFOW *, BOOL); @@ -197,7 +195,7 @@ const struct builtin_class_descr MENU_builtin_class = (LPCWSTR)POPUPMENU_CLASS_ATOM, /* name */ CS_DROPSHADOW | CS_SAVEBITS | CS_DBLCLKS, /* style */ NULL, /* procA (winproc is Unicode only) */ - PopupMenuWndProc, /* procW */ + BUILTIN_WINPROC(WINPROC_MENU), /* procW */ sizeof(HMENU), /* extra */ IDC_ARROW, /* cursor */ (HBRUSH)(COLOR_MENU+1) /* brush */ @@ -3442,7 +3440,7 @@ BOOL WINAPI TrackPopupMenu( HMENU hMenu, UINT wFlags, INT x, INT y, * * NOTE: Windows has totally different (and undocumented) popup wndproc. */ -static LRESULT WINAPI PopupMenuWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) +LRESULT WINAPI PopupMenuWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) { TRACE("hwnd=%p msg=0x%04x wp=0x%04lx lp=0x%08lx\n", hwnd, message, wParam, lParam); diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index 0f9b6f221f2..15920a14eb5 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -76,6 +76,7 @@ static WINDOWPROC winproc_array[MAX_WINPROCS] = { StaticWndProcA, StaticWndProcW }, /* WINPROC_STATIC */ { NULL, DesktopWndProc }, /* WINPROC_DESKTOP */ { NULL, IconTitleWndProc }, /* WINPROC_ICONTITLE */ + { NULL, PopupMenuWndProc }, /* WINPROC_MENU */ }; static UINT winproc_used = NB_BUILTIN_WINPROCS;