Author: jimtabor
Date: Wed Jul 15 07:33:21 2009
New Revision: 41963
URL:
http://svn.reactos.org/svn/reactos?rev=41963&view=rev
Log:
- Implement support for HWND_MESSAGE. Need full testing!
Modified:
trunk/reactos/dll/win32/user32/controls/regcontrol.c
trunk/reactos/dll/win32/user32/include/controls.h
trunk/reactos/dll/win32/user32/misc/desktop.c
trunk/reactos/dll/win32/user32/misc/dllmain.c
trunk/reactos/include/reactos/win32k/ntuser.h
trunk/reactos/subsystems/win32/csrss/win32csr/desktopbg.c
trunk/reactos/subsystems/win32/win32k/include/class.h
trunk/reactos/subsystems/win32/win32k/ntuser/class.c
trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c
trunk/reactos/subsystems/win32/win32k/ntuser/window.c
trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c
trunk/reactos/subsystems/win32/win32k/objects/dclife.c
Modified: trunk/reactos/dll/win32/user32/controls/regcontrol.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/…
==============================================================================
--- trunk/reactos/dll/win32/user32/controls/regcontrol.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/controls/regcontrol.c [iso-8859-1] Wed Jul 15 07:33:21
2009
@@ -23,7 +23,6 @@
{ &POPUPMENU_builtin_class, FNID_MENU },
{ &COMBO_builtin_class, FNID_COMBOBOX },
{ &COMBOLBOX_builtin_class, FNID_COMBOLBOX },
- { &DESKTOP_builtin_class, FNID_DESKTOP },
{ &MDICLIENT_builtin_class, FNID_MDICLIENT },
#if 0
{ &MENU_builtin_class, FNID_MENU },
@@ -63,7 +62,7 @@
}
-#if 0
+
static PFNCLIENT pfnClientA;
static PFNCLIENT pfnClientW;
static PFNCLIENTWORKER pfnClientWorker;
@@ -72,12 +71,12 @@
{
NTSTATUS Status;
- pfnClientA.pfnScrollBarWndProc = ScrollBarWndProcA;
- pfnClientW.pfnScrollBarWndProc = ScrollBarWndProcW;
- pfnClientA.pfnTitleWndProc = IconTitleWndProc;
- pfnClientW.pfnTitleWndProc = IconTitleWndProc;
- pfnClientA.pfnMenuWndProc = PopupMenuWndProcA;
- pfnClientW.pfnMenuWndProc = PopupMenuWndProcW;
+// pfnClientA.pfnScrollBarWndProc = ScrollBarWndProcA;
+// pfnClientW.pfnScrollBarWndProc = ScrollBarWndProcW;
+// pfnClientA.pfnTitleWndProc = IconTitleWndProc;
+// pfnClientW.pfnTitleWndProc = IconTitleWndProc;
+// pfnClientA.pfnMenuWndProc = PopupMenuWndProcA;
+// pfnClientW.pfnMenuWndProc = PopupMenuWndProcW;
pfnClientA.pfnDesktopWndProc = DesktopWndProc; // Fixme!
pfnClientW.pfnDesktopWndProc = DesktopWndProc;
pfnClientA.pfnDefWindowProc = DefWindowProcA;
@@ -86,22 +85,22 @@
pfnClientW.pfnMessageWindowProc = DefWindowProcW;
pfnClientA.pfnSwitchWindowProc = DefWindowProcA;
pfnClientW.pfnSwitchWindowProc = DefWindowProcW;
- pfnClientA.pfnButtonWndProc = ButtonWndProcA;
- pfnClientW.pfnButtonWndProc = ButtonWndProcW
- pfnClientA.pfnComboBoxWndProc = ComboWndProcA;
- pfnClientW.pfnComboBoxWndProc = ComboWndProcW;
- pfnClientA.pfnComboListBoxProc = ListBoxWndProcA;
- pfnClientW.pfnComboListBoxProc = ListBoxWndProcW;
- pfnClientA.pfnDialogWndProc = DefDlgProcA;
- pfnClientW.pfnDialogWndProc = DefDlgProcW;
- pfnClientA.pfnEditWndProc = EditWndProcA;
- pfnClientW.pfnEditWndProc = EditWndProcW;
- pfnClientA.pfnListBoxWndProc = ListBoxWndProcA;
- pfnClientW.pfnListBoxWndProc = ListBoxWndProcW;
- pfnClientA.pfnMDIClientWndProc = MDIClientWndProcA;
- pfnClientW.pfnMDIClientWndProc = MDIClientWndProcW;
- pfnClientA.pfnStaticWndProc = StaticWndProcA;
- pfnClientW.pfnStaticWndProc = StaticWndProcW;
+// pfnClientA.pfnButtonWndProc = ButtonWndProcA;
+// pfnClientW.pfnButtonWndProc = ButtonWndProcW
+// pfnClientA.pfnComboBoxWndProc = ComboWndProcA;
+// pfnClientW.pfnComboBoxWndProc = ComboWndProcW;
+// pfnClientA.pfnComboListBoxProc = ListBoxWndProcA;
+// pfnClientW.pfnComboListBoxProc = ListBoxWndProcW;
+// pfnClientA.pfnDialogWndProc = DefDlgProcA;
+// pfnClientW.pfnDialogWndProc = DefDlgProcW;
+// pfnClientA.pfnEditWndProc = EditWndProcA;
+// pfnClientW.pfnEditWndProc = EditWndProcW;
+// pfnClientA.pfnListBoxWndProc = ListBoxWndProcA;
+// pfnClientW.pfnListBoxWndProc = ListBoxWndProcW;
+// pfnClientA.pfnMDIClientWndProc = MDIClientWndProcA;
+// pfnClientW.pfnMDIClientWndProc = MDIClientWndProcW;
+// pfnClientA.pfnStaticWndProc = StaticWndProcA;
+// pfnClientW.pfnStaticWndProc = StaticWndProcW;
pfnClientA.pfnImeWndProc = DefWindowProcA;
pfnClientW.pfnImeWndProc = DefWindowProcW;
pfnClientA.pfnGhostWndProc = DefWindowProcA;
@@ -119,14 +118,14 @@
pfnClientA.pfnMDIActivateDlgProc = DefWindowProcA;
pfnClientW.pfnMDIActivateDlgProc = DefWindowProcW;
- pfnClientWorker.pfnButtonWndProc = ButtonWndProc_common;
- pfnClientWorker.pfnComboBoxWndProc = ComboWndProc_common;
- pfnClientWorker.pfnComboListBoxProc = ListBoxWndProc_common;
-// pfnClientWorker.pfnDialogWndProc = DefDlgProc_common;
- pfnClientWorker.pfnEditWndProc = EditWndProc_common;
- pfnClientWorker.pfnListBoxWndProc = ListBoxWndProc_common;
- pfnClientWorker.pfnMDIClientWndProc = MDIClientWndProc_common;
- pfnClientWorker.pfnStaticWndProc = StaticWndProc_common;
+// pfnClientWorker.pfnButtonWndProc = ButtonWndProc_common;
+// pfnClientWorker.pfnComboBoxWndProc = ComboWndProc_common;
+// pfnClientWorker.pfnComboListBoxProc = ListBoxWndProc_common;
+//// pfnClientWorker.pfnDialogWndProc = DefDlgProc_common;
+// pfnClientWorker.pfnEditWndProc = EditWndProc_common;
+// pfnClientWorker.pfnListBoxWndProc = ListBoxWndProc_common;
+// pfnClientWorker.pfnMDIClientWndProc = MDIClientWndProc_common;
+// pfnClientWorker.pfnStaticWndProc = StaticWndProc_common;
pfnClientWorker.pfnImeWndProc = User32DefWindowProc;
pfnClientWorker.pfnGhostWndProc = User32DefWindowProc;
pfnClientWorker.pfnCtfHookProc = User32DefWindowProc;
@@ -138,4 +137,3 @@
return NT_SUCCESS(Status) ? TRUE : FALSE;
}
-#endif
Modified: trunk/reactos/dll/win32/user32/include/controls.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/c…
==============================================================================
--- trunk/reactos/dll/win32/user32/include/controls.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/include/controls.h [iso-8859-1] Wed Jul 15 07:33:21
2009
@@ -106,4 +106,9 @@
#define LB_ADDSTRING_UPPER 0x1AC
#define LB_ADDSTRING_LOWER 0x1AD
+#define DESKTOP_CLASS_ATOM MAKEINTATOMA(32769) /* Desktop */
+LRESULT WINAPI DesktopWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam );
+LRESULT WINAPI User32DefWindowProc(HWND,UINT,WPARAM,LPARAM,BOOL);
+BOOL WINAPI RegisterClientPFN(VOID);
+
#endif /* _ROS_CONTROLS_H */
Modified: trunk/reactos/dll/win32/user32/misc/desktop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/desk…
==============================================================================
--- trunk/reactos/dll/win32/user32/misc/desktop.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/misc/desktop.c [iso-8859-1] Wed Jul 15 07:33:21 2009
@@ -14,12 +14,10 @@
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(user32);
-#define DESKTOP_CLASS_ATOM MAKEINTATOMA(32769) /* Desktop */
-static LRESULT WINAPI DesktopWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM
lParam );
-
/*********************************************************************
* desktop class descriptor
*/
+#if 0 // Kept for referencing.
const struct builtin_class_descr DESKTOP_builtin_class =
{
(LPCWSTR) DESKTOP_CLASS_ATOM, /* name */
@@ -30,13 +28,12 @@
IDC_ARROW, /* cursor */
(HBRUSH)(COLOR_BACKGROUND+1) /* brush */
};
-
-static
+#endif
LRESULT
WINAPI
DesktopWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam )
{
- FIXME("Desktop Class Atom!\n");
+ TRACE("Desktop Class Atom! hWnd 0x%x, Msg %d\n", hwnd, message);
if (message == WM_NCCREATE) return TRUE;
return 0; /* all other messages are ignored */
}
Modified: trunk/reactos/dll/win32/user32/misc/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/dllm…
==============================================================================
--- trunk/reactos/dll/win32/user32/misc/dllmain.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/misc/dllmain.c [iso-8859-1] Wed Jul 15 07:33:21 2009
@@ -242,6 +242,7 @@
gHandleEntries = SharedPtrToUser(gHandleTable->handles);
//ERR("1 SI 0x%x : HT 0x%x : D 0x%x\n", UserCon.siClient.psi,
UserCon.siClient.aheList, g_ulSharedDelta);
+ RegisterClientPFN();
/* Allocate an index for user32 thread local data. */
User32TlsIndex = TlsAlloc();
if (User32TlsIndex != TLS_OUT_OF_INDEXES)
@@ -349,4 +350,7 @@
g_psi = SharedPtrToUser(UserCon.siClient.psi);
gHandleTable = SharedPtrToUser(UserCon.siClient.aheList);
gHandleEntries = SharedPtrToUser(gHandleTable->handles);
-}
+
+ RegisterClientPFN();
+
+}
Modified: trunk/reactos/include/reactos/win32k/ntuser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntu…
==============================================================================
--- trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] Wed Jul 15 07:33:21 2009
@@ -553,7 +553,7 @@
PVOID aheList; // Handle Entry List
PVOID pDispInfo; // global PDISPLAYINFO pointer
ULONG_PTR ulSharedDelta; // Heap delta
- WNDMSG awmControl[31];
+ WNDMSG awmControl[FNID_LAST - FNID_FIRST];
WNDMSG DefWindowMsgs;
WNDMSG DefWindowSpecMsgs;
} SHAREDINFO, *PSHAREDINFO;
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/desktopbg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/desktopbg.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/desktopbg.c [iso-8859-1] Wed Jul 15
07:33:21 2009
@@ -11,7 +11,7 @@
#include "w32csr.h"
#include <debug.h>
-#define DESKTOP_WINDOW_ATOM 32880
+#define DESKTOP_WINDOW_ATOM 32769 //32880
#define PM_SHOW_DESKTOP 1
#define PM_HIDE_DESKTOP 2
Modified: trunk/reactos/subsystems/win32/win32k/include/class.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/class.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/class.h [iso-8859-1] Wed Jul 15 07:33:21
2009
@@ -78,6 +78,18 @@
OUT PWINDOWCLASS *BaseClass OPTIONAL,
OUT PWINDOWCLASS **Link OPTIONAL);
+#define REGISTERCLASS_SYSTEM 0x4
+
+PWINDOWCLASS
+FASTCALL
+IntCreateClass(IN CONST WNDCLASSEXW* lpwcx,
+ IN PUNICODE_STRING ClassName,
+ IN PUNICODE_STRING MenuName,
+ IN WNDPROC wpExtra,
+ IN DWORD dwFlags,
+ IN PDESKTOP Desktop,
+ IN PPROCESSINFO pi);
+
PCALLPROC
UserFindCallProc(IN PWINDOWCLASS Class,
IN WNDPROC WndProc,
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/class.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/class.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/class.c [iso-8859-1] Wed Jul 15 07:33:21
2009
@@ -37,8 +37,6 @@
/* WINDOWCLASS ***************************************************************/
-#define REGISTERCLASS_SYSTEM 0x4
-
static VOID
IntFreeClassMenuName(IN OUT PWINDOWCLASS Class)
{
@@ -168,6 +166,20 @@
}
else
AtomName = ClassName->Buffer;
+
+ /* If an Atom, need to verify, if it was already added to the global atom list. */
+ if (IS_ATOM(AtomName))
+ {
+ *pAtom = (RTL_ATOM)((ULONG_PTR)AtomName);
+ Status = RtlQueryAtomInAtomTable( gAtomTable,
+ *pAtom,
+ NULL,
+ NULL,
+ NULL,
+ NULL);
+
+ if (NT_SUCCESS(Status)) return TRUE;
+ }
Status = RtlAddAtomToAtomTable(gAtomTable,
AtomName,
@@ -786,7 +798,8 @@
return Ret;
}
-static PWINDOWCLASS
+PWINDOWCLASS
+FASTCALL
IntCreateClass(IN CONST WNDCLASSEXW* lpwcx,
IN PUNICODE_STRING ClassName,
IN PUNICODE_STRING MenuName,
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] Wed Jul 15
07:33:21 2009
@@ -854,7 +854,6 @@
}
/* SYSCALLS *******************************************************************/
-
/*
* NtUserCreateDesktop
*
@@ -898,7 +897,7 @@
{
OBJECT_ATTRIBUTES ObjectAttributes;
PTHREADINFO W32Thread;
-// HWND hwndMessage;
+ HWND hwndMessage;
PWINSTATION_OBJECT WinStaObject;
PDESKTOP DesktopObject;
UNICODE_STRING DesktopName;
@@ -912,7 +911,10 @@
ULONG_PTR HeapSize = 4 * 1024 * 1024; /* FIXME */
HWINSTA hWindowStation = NULL ;
PUNICODE_STRING lpszDesktopName = NULL;
-// UNICODE_STRING AtomName;
+ UNICODE_STRING ClassName, WindowName, MenuName;
+ PPROCESSINFO pi = GetW32ProcessInfo();
+ WNDCLASSEXW wc;
+ PWINDOWCLASS Class;
DECLARE_RETURN(HDESK);
DPRINT("Enter NtUserCreateDesktop: %wZ\n", lpszDesktopName);
@@ -1072,7 +1074,12 @@
}
/*
- * Create a handle for CSRSS and notify CSRSS
+ * Create a handle for CSRSS and notify CSRSS for Creating Desktop Window.
+ *
+ * Honestly, I believe this is a cleverly written hack that allowed ReactOS
+ * to function at the beginning of the project by ramroding the GUI into
+ * operation and making the desktop window work from user space.
+ * (jt)
*/
Request.Type = MAKE_CSR_API(CREATE_DESKTOP, CSR_GUI);
Status = CsrInsertObject(Desktop,
@@ -1100,28 +1107,50 @@
if (!W32Thread->Desktop) IntSetThreadDesktop(DesktopObject,FALSE);
-#if 0
/*
- Based on wine/server/window.c line 1804 in get_desktop_window.
- We create an atom to be used for create desktop to create
- the message window.
+ Based on wine/server/window.c in get_desktop_window.
*/
- // FIXME!
- // ReactOS CreateWindow does not know how to correctly use Atom Classes.
- // So we have this HAX!
- { // Warning! HACK! Yes it is very wrong!
-
- // Normally, this would have been performed during the win32k init phase.
- // AtomMessage = IntAddGlobalAtom(L"Message", TRUE); // <- correct, but
should be in ntuser.c
-
- AtomMessage =
- }
- AtomName.Buffer = ((PWSTR)((ULONG_PTR)(WORD)(AtomMessage)));
- AtomName.Length = 0;
+
+ ClassName.Buffer = ((PWSTR)((ULONG_PTR)(WORD)(AtomMessage)));
+ ClassName.Length = 0;
+ RtlZeroMemory(&MenuName, sizeof(MenuName));
+ RtlZeroMemory(&WindowName, sizeof(WindowName));
+
+ wc.cbSize = sizeof(wc);
+ wc.style = CS_DBLCLKS|CS_PARENTDC;
+ wc.lpfnWndProc = gpsi->apfnClientW.pfnDesktopWndProc; // Use User32 Desktop Proc.
+ wc.cbClsExtra = 0;
+ wc.cbWndExtra = 0;
+ wc.hInstance = pi->hModUser; // hModClient;
+ wc.hIcon = NULL;
+ wc.hCursor = NULL;
+ wc.hbrBackground = 0;
+ wc.lpszMenuName = NULL;
+ wc.lpszClassName = ClassName.Buffer;
+ wc.hIconSm = NULL;
+
+ Class = IntCreateClass( &wc,
+ &ClassName,
+ &MenuName,
+ NULL,
+ REGISTERCLASS_SYSTEM,
+ NULL,
+ pi);
+ if (Class != NULL)
+ {
+ ASSERT(Class->System);
+ Class->Next = pi->SystemClassList;
+ (void)InterlockedExchangePointer((PVOID*)&pi->SystemClassList,
+ Class);
+ }
+ else
+ {
+ DPRINT1("!!! Registering Message system class failed!\n");
+ }
hwndMessage = co_IntCreateWindowEx( 0,
- &AtomName,
- NULL,
+ &ClassName,
+ &WindowName,
(WS_POPUP|WS_CLIPCHILDREN),
0,
0,
@@ -1129,7 +1158,7 @@
100,
NULL,
NULL,
- NULL,//hModuleWin, // pi->hModUser; ? no!
+ pi->hModUser, // hModClient;
NULL,
0,
TRUE);
@@ -1141,7 +1170,7 @@
{
DesktopObject->spwndMessage = hwndMessage;
}
-#endif
+
RETURN( Desktop);
CLEANUP:
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/window.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] Wed Jul 15 07:33:21
2009
@@ -235,6 +235,8 @@
PWINDOW_OBJECT Child;
HWND *List;
UINT Index, NumChildren = 0;
+
+ if (!Window) return NULL;
for (Child = Window->FirstChild; Child; Child = Child->NextSibling)
++NumChildren;
@@ -1594,8 +1596,8 @@
* native ole32.OleInitialize uses HWND_MESSAGE to create the
* message window (style: WS_POPUP|WS_DISABLED)
*/
- DPRINT1("FIXME - Parent is HWND_MESSAGE\n");
- // ParentWindowHandle = IntGetMessageWindow();
+ ParentWindowHandle = IntGetMessageWindow();
+ DPRINT1("Parent is HWND_MESSAGE 0x%x\n", ParentWindowHandle);
}
else if (hWndParent)
{
@@ -1784,7 +1786,7 @@
InitializeListHead(&Wnd->PropListHead);
InitializeListHead(&Window->WndObjListHead);
- if (NULL != WindowName->Buffer && WindowName->Length > 0)
+ if ( NULL != WindowName->Buffer && WindowName->Length > 0 )
{
Wnd->WindowName.Buffer = DesktopHeapAlloc(Wnd->pdesktop,
WindowName->Length +
sizeof(UNICODE_NULL));
@@ -1887,6 +1889,8 @@
Cs.x = Pos.x;
Cs.y = Pos.y;
Cs.style = Wnd->Style;
+// Cs.lpszName = (LPCWSTR) WindowName->Buffer;
+// Cs.lpszClass = (LPCWSTR) ClassName->Buffer;
Cs.lpszName = (LPCWSTR) WindowName;
Cs.lpszClass = (LPCWSTR) ClassName;
Cs.dwExStyle = dwExStyle;
@@ -2771,12 +2775,10 @@
if(hwndParent == NULL)
hwndParent = Desktop;
- /* FIXME
else if(hwndParent == HWND_MESSAGE)
{
hwndParent = IntGetMessageWindow();
}
- */
if(!(Parent = UserGetWindowObject(hwndParent)))
{
@@ -3236,7 +3238,7 @@
}
else if (hWndNewParent == HWND_MESSAGE)
{
- // hWndNewParent = IntGetMessageWindow();
+ hWndNewParent = IntGetMessageWindow();
}
RETURN( co_UserSetParent(hWndChild, hWndNewParent));
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c [iso-8859-1] Wed Jul 15 07:33:21
2009
@@ -1034,6 +1034,8 @@
}
}
+ if (!Window->Wnd) return FALSE;
+
OldWindowRect = Window->Wnd->WindowRect;
OldClientRect = Window->Wnd->ClientRect;
Modified: trunk/reactos/subsystems/win32/win32k/objects/dclife.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dclife.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dclife.c [iso-8859-1] Wed Jul 15
07:33:21 2009
@@ -375,6 +375,8 @@
HDC Ret;
NTSTATUS Status = STATUS_SUCCESS;
+ if (!Device) return UserGetDesktopDC(iType,FALSE,TRUE);
+
if (InitData)
{
_SEH2_TRY