user32: Pre-allocate the window procedure for the menu class.
This commit is contained in:
parent
d88c34099b
commit
e6f15c5886
|
@ -46,6 +46,7 @@ enum builtin_winprocs
|
||||||
/* unicode-only procs */
|
/* unicode-only procs */
|
||||||
WINPROC_DESKTOP,
|
WINPROC_DESKTOP,
|
||||||
WINPROC_ICONTITLE,
|
WINPROC_ICONTITLE,
|
||||||
|
WINPROC_MENU,
|
||||||
NB_BUILTIN_WINPROCS,
|
NB_BUILTIN_WINPROCS,
|
||||||
NB_BUILTIN_AW_WINPROCS = WINPROC_DESKTOP
|
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 DesktopWndProc(HWND,UINT,WPARAM,LPARAM) DECLSPEC_HIDDEN;
|
||||||
extern LRESULT WINAPI IconTitleWndProc(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 */
|
/* Wow handlers */
|
||||||
|
|
||||||
|
|
|
@ -183,8 +183,6 @@ static HMENU top_popup_hmenu;
|
||||||
/* Flag set by EndMenu() to force an exit from menu tracking */
|
/* Flag set by EndMenu() to force an exit from menu tracking */
|
||||||
static BOOL fEndMenu = FALSE;
|
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);
|
DWORD WINAPI DrawMenuBarTemp(HWND hwnd, HDC hDC, LPRECT lprect, HMENU hMenu, HFONT hFont);
|
||||||
|
|
||||||
static BOOL SetMenuItemInfo_common( MENUITEM *, const MENUITEMINFOW *, BOOL);
|
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 */
|
(LPCWSTR)POPUPMENU_CLASS_ATOM, /* name */
|
||||||
CS_DROPSHADOW | CS_SAVEBITS | CS_DBLCLKS, /* style */
|
CS_DROPSHADOW | CS_SAVEBITS | CS_DBLCLKS, /* style */
|
||||||
NULL, /* procA (winproc is Unicode only) */
|
NULL, /* procA (winproc is Unicode only) */
|
||||||
PopupMenuWndProc, /* procW */
|
BUILTIN_WINPROC(WINPROC_MENU), /* procW */
|
||||||
sizeof(HMENU), /* extra */
|
sizeof(HMENU), /* extra */
|
||||||
IDC_ARROW, /* cursor */
|
IDC_ARROW, /* cursor */
|
||||||
(HBRUSH)(COLOR_MENU+1) /* brush */
|
(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.
|
* 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);
|
TRACE("hwnd=%p msg=0x%04x wp=0x%04lx lp=0x%08lx\n", hwnd, message, wParam, lParam);
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,7 @@ static WINDOWPROC winproc_array[MAX_WINPROCS] =
|
||||||
{ StaticWndProcA, StaticWndProcW }, /* WINPROC_STATIC */
|
{ StaticWndProcA, StaticWndProcW }, /* WINPROC_STATIC */
|
||||||
{ NULL, DesktopWndProc }, /* WINPROC_DESKTOP */
|
{ NULL, DesktopWndProc }, /* WINPROC_DESKTOP */
|
||||||
{ NULL, IconTitleWndProc }, /* WINPROC_ICONTITLE */
|
{ NULL, IconTitleWndProc }, /* WINPROC_ICONTITLE */
|
||||||
|
{ NULL, PopupMenuWndProc }, /* WINPROC_MENU */
|
||||||
};
|
};
|
||||||
|
|
||||||
static UINT winproc_used = NB_BUILTIN_WINPROCS;
|
static UINT winproc_used = NB_BUILTIN_WINPROCS;
|
||||||
|
|
Loading…
Reference in New Issue