From c9370c44ba13ed8f06d24d4513300ed70a31c24e Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 25 Jun 2008 14:19:34 +0200 Subject: [PATCH] user32: Register the builtin 'Message' window class. --- dlls/user32/class.c | 1 + dlls/user32/controls.h | 1 + dlls/user32/message.c | 29 +++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+) diff --git a/dlls/user32/class.c b/dlls/user32/class.c index 1ca50f583be..1f4b7b5028d 100644 --- a/dlls/user32/class.c +++ b/dlls/user32/class.c @@ -421,6 +421,7 @@ void CLASS_RegisterBuiltinClasses(void) register_builtin( &LISTBOX_builtin_class ); register_builtin( &MDICLIENT_builtin_class ); register_builtin( &MENU_builtin_class ); + register_builtin( &MESSAGE_builtin_class ); register_builtin( &SCROLL_builtin_class ); register_builtin( &STATIC_builtin_class ); diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h index dbec147b17b..a16d166bf38 100644 --- a/dlls/user32/controls.h +++ b/dlls/user32/controls.h @@ -53,6 +53,7 @@ extern const struct builtin_class_descr ICONTITLE_builtin_class DECLSPEC_HIDDEN; extern const struct builtin_class_descr LISTBOX_builtin_class DECLSPEC_HIDDEN; extern const struct builtin_class_descr MDICLIENT_builtin_class DECLSPEC_HIDDEN; extern const struct builtin_class_descr MENU_builtin_class DECLSPEC_HIDDEN; +extern const struct builtin_class_descr MESSAGE_builtin_class DECLSPEC_HIDDEN; extern const struct builtin_class_descr SCROLL_builtin_class DECLSPEC_HIDDEN; extern const struct builtin_class_descr STATIC_builtin_class DECLSPEC_HIDDEN; diff --git a/dlls/user32/message.c b/dlls/user32/message.c index ce18acdc23d..19b3935eda8 100644 --- a/dlls/user32/message.c +++ b/dlls/user32/message.c @@ -89,6 +89,22 @@ 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 */ + 0, /* extra */ + IDC_ARROW, /* cursor */ + 0 /* brush */ +}; + + + /* flag for messages that contain pointers */ /* 32 messages per entry, messages 0..31 map to bits 0..31 */ @@ -315,6 +331,19 @@ static inline BOOL get_pending_wmchar( MSG *msg, UINT first, UINT last, BOOL rem return TRUE; } + +/*********************************************************************** + * message_winproc + * + * Window procedure for "Message" windows (HWND_MESSAGE parent). + */ +static LRESULT WINAPI message_winproc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) +{ + if (message == WM_NCCREATE) return TRUE; + return 0; /* all other messages are ignored */ +} + + /*********************************************************************** * broadcast_message_callback * -- 2.11.4.GIT