From d88c34099b16540c1f122d5e97ad7529a1883176 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 18 Dec 2009 12:37:05 +0100 Subject: [PATCH] user32: Pre-allocate the window procedure for the icon title class. --- dlls/user32/controls.h | 2 ++ dlls/user32/icontitle.c | 4 +--- dlls/user32/winproc.c | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h index 16ebe6d152b..726ca72663a 100644 --- a/dlls/user32/controls.h +++ b/dlls/user32/controls.h @@ -45,6 +45,7 @@ enum builtin_winprocs WINPROC_STATIC, /* unicode-only procs */ WINPROC_DESKTOP, + WINPROC_ICONTITLE, NB_BUILTIN_WINPROCS, NB_BUILTIN_AW_WINPROCS = WINPROC_DESKTOP }; @@ -79,6 +80,7 @@ extern const struct builtin_class_descr SCROLL_builtin_class DECLSPEC_HIDDEN; 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; /* Wow handlers */ diff --git a/dlls/user32/icontitle.c b/dlls/user32/icontitle.c index aa8ebc590ad..b6f2c084470 100644 --- a/dlls/user32/icontitle.c +++ b/dlls/user32/icontitle.c @@ -38,8 +38,6 @@ static BOOL bMultiLineTitle; static HFONT hIconTitleFont; -static LRESULT WINAPI IconTitleWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ); - /********************************************************************* * icon title class descriptor */ @@ -48,7 +46,7 @@ const struct builtin_class_descr ICONTITLE_builtin_class = (LPCWSTR)ICONTITLE_CLASS_ATOM, /* name */ 0, /* style */ NULL, /* procA (winproc is Unicode only) */ - IconTitleWndProc, /* procW */ + BUILTIN_WINPROC(WINPROC_ICONTITLE), /* procW */ 0, /* extra */ IDC_ARROW, /* cursor */ 0 /* brush */ diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index a5cbf3258c0..0f9b6f221f2 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -75,6 +75,7 @@ static WINDOWPROC winproc_array[MAX_WINPROCS] = { ScrollBarWndProcA, ScrollBarWndProcW }, /* WINPROC_SCROLLBAR */ { StaticWndProcA, StaticWndProcW }, /* WINPROC_STATIC */ { NULL, DesktopWndProc }, /* WINPROC_DESKTOP */ + { NULL, IconTitleWndProc }, /* WINPROC_ICONTITLE */ }; static UINT winproc_used = NB_BUILTIN_WINPROCS;