Commit 6b0cdc19 authored by Alexandre Julliard's avatar Alexandre Julliard

user32: Pre-allocate the window procedure for the message class.

parent e6f15c58
......@@ -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 */
......
......@@ -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 */
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment