Module: wine Branch: master Commit: 6b0cdc192272094cf0ff783aef9176ba090bded6 URL: http://source.winehq.org/git/wine.git/?a=commit;h=6b0cdc192272094cf0ff783aef...
Author: Alexandre Julliard julliard@winehq.org Date: Fri Dec 18 12:38:22 2009 +0100
user32: Pre-allocate the window procedure for the message class.
---
dlls/user32/controls.h | 2 ++ dlls/user32/message.c | 8 ++++---- dlls/user32/winproc.c | 1 + 3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h index 6925f33..ba455ba 100644 --- a/dlls/user32/controls.h +++ b/dlls/user32/controls.h @@ -47,6 +47,7 @@ enum builtin_winprocs WINPROC_DESKTOP, WINPROC_ICONTITLE, WINPROC_MENU, + WINPROC_MESSAGE, NB_BUILTIN_WINPROCS, NB_BUILTIN_AW_WINPROCS = WINPROC_DESKTOP }; @@ -83,6 +84,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; +extern LRESULT WINAPI MessageWndProc(HWND,UINT,WPARAM,LPARAM) DECLSPEC_HIDDEN;
/* Wow handlers */
diff --git a/dlls/user32/message.c b/dlls/user32/message.c index 285a24c..b544a76 100644 --- a/dlls/user32/message.c +++ b/dlls/user32/message.c @@ -91,13 +91,13 @@ struct send_message_info
/* Message class descriptor */ static const WCHAR messageW[] = {'M','e','s','s','a','g','e',0}; -static LRESULT WINAPI message_winproc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ); + const struct builtin_class_descr MESSAGE_builtin_class = { messageW, /* name */ 0, /* style */ NULL, /* procA (winproc is Unicode only) */ - message_winproc, /* procW */ + BUILTIN_WINPROC(WINPROC_MESSAGE), /* procW */ 0, /* extra */ IDC_ARROW, /* cursor */ 0 /* brush */ @@ -333,11 +333,11 @@ static inline BOOL get_pending_wmchar( MSG *msg, UINT first, UINT last, BOOL rem
/*********************************************************************** - * message_winproc + * MessageWndProc * * Window procedure for "Message" windows (HWND_MESSAGE parent). */ -static LRESULT WINAPI message_winproc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) +LRESULT WINAPI MessageWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) { if (message == WM_NCCREATE) return TRUE; return 0; /* all other messages are ignored */ diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index 15920a1..7bdb91d 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -77,6 +77,7 @@ static WINDOWPROC winproc_array[MAX_WINPROCS] = { NULL, DesktopWndProc }, /* WINPROC_DESKTOP */ { NULL, IconTitleWndProc }, /* WINPROC_ICONTITLE */ { NULL, PopupMenuWndProc }, /* WINPROC_MENU */ + { NULL, MessageWndProc }, /* WINPROC_MESSAGE */ };
static UINT winproc_used = NB_BUILTIN_WINPROCS;