From ed6d1ed52f59abfb5dd9086cdb1fc7c53915eb55 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Sun, 2 Apr 2006 05:10:26 +0000 Subject: [PATCH] Patch by Alexandre Julliard, Allow creating windows of the desktop class. svn path=/trunk/; revision=21443 --- .../dll/win32/user32/controls/regcontrol.c | 2 -- reactos/dll/win32/user32/misc/desktop.c | 29 +++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/reactos/dll/win32/user32/controls/regcontrol.c b/reactos/dll/win32/user32/controls/regcontrol.c index 699ce5e614c..635a901dde6 100644 --- a/reactos/dll/win32/user32/controls/regcontrol.c +++ b/reactos/dll/win32/user32/controls/regcontrol.c @@ -69,9 +69,7 @@ ControlsInit(LPCWSTR ClassName) &POPUPMENU_builtin_class, &COMBO_builtin_class, &COMBOLBOX_builtin_class, -#if 0 &DESKTOP_builtin_class, -#endif &MDICLIENT_builtin_class, #if 0 &MENU_builtin_class, diff --git a/reactos/dll/win32/user32/misc/desktop.c b/reactos/dll/win32/user32/misc/desktop.c index b2c772ffd13..14a130a96f0 100644 --- a/reactos/dll/win32/user32/misc/desktop.c +++ b/reactos/dll/win32/user32/misc/desktop.c @@ -11,6 +11,35 @@ #include +#define DESKTOP_CLASS_ATOM MAKEINTATOMA(32769) /* Desktop */ +static LRESULT WINAPI DesktopWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ); + +/********************************************************************* + * desktop class descriptor + */ +const struct builtin_class_descr DESKTOP_builtin_class = +{ + (LPCWSTR) DESKTOP_CLASS_ATOM, /* name */ + CS_DBLCLKS, /* style */ + NULL, /* procA (winproc is Unicode only) */ + (WNDPROC) DesktopWndProc, /* procW */ + 0, /* extra */ + IDC_ARROW, /* cursor */ + (HBRUSH)(COLOR_BACKGROUND+1) /* brush */ +}; + +static +LRESULT +WINAPI +DesktopWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) +{ + DPRINT1("Desktop Class Atom!\n"); + if (message == WM_NCCREATE) return TRUE; + return 0; /* all other messages are ignored */ +} + + + VOID STDCALL LogFontW2A(LPLOGFONTA pA, CONST LOGFONTW *pW)