Work around for ROS to display the Explorer Rebar control
Modified: trunk/reactos/subsys/system/explorer/shell/mainframe.cpp
_____
Modified: trunk/reactos/subsys/system/explorer/shell/mainframe.cpp
--- trunk/reactos/subsys/system/explorer/shell/mainframe.cpp
2006-01-24 06:02:32 UTC (rev 21010)
+++ trunk/reactos/subsys/system/explorer/shell/mainframe.cpp
2006-01-24 20:05:50 UTC (rev 21011)
@@ -298,9 +298,14 @@
case WM_DESTROY:
break;
- case WM_SIZE:
+ case WM_SIZE:
+#ifdef _ROS_ ///@todo Work around to display rebar in ROS (with
flickering) as long as the control isn't fixed
+ int height = SendMessage(_hwndrebar, RB_GETBARHEIGHT, 0,
0);
+ MoveWindow(_hwndrebar, 0, 0, LOWORD(lparam), height,
TRUE);
+#else
resize_frame(LOWORD(lparam), HIWORD(lparam));
- break; // do not pass message to DefFrameProc
+#endif
+ break; // do not pass message to DefFrameProc
case WM_GETMINMAXINFO: {
LPMINMAXINFO lpmmi = (LPMINMAXINFO)lparam;
GetCurrentObject does not SetLastError() on a null object.
Modified: trunk/reactos/subsys/win32k/objects/dc.c
_____
Modified: trunk/reactos/subsys/win32k/objects/dc.c
--- trunk/reactos/subsys/win32k/objects/dc.c 2006-01-24 06:01:58 UTC
(rev 21009)
+++ trunk/reactos/subsys/win32k/objects/dc.c 2006-01-24 06:02:32 UTC
(rev 21010)
@@ -1173,6 +1173,9 @@
HGDIOBJ SelObject;
DC *dc;
+ /* From Wine: GetCurrentObject does not SetLastError() on a null
object */
+ if(!hDC) return NULL;
+
if(!(dc = DC_LockDc(hDC)))
{
SetLastWin32Error(ERROR_INVALID_HANDLE);
DeleteObject does not SetLastError on a null object.
Modified: trunk/reactos/lib/gdi32/objects/dc.c
_____
Modified: trunk/reactos/lib/gdi32/objects/dc.c
--- trunk/reactos/lib/gdi32/objects/dc.c 2006-01-24 05:39:17 UTC
(rev 21008)
+++ trunk/reactos/lib/gdi32/objects/dc.c 2006-01-24 06:01:58 UTC
(rev 21009)
@@ -193,6 +193,9 @@
STDCALL
DeleteObject(HGDIOBJ hObject)
{
+ /* From Wine: DeleteObject does not SetLastError() on a null object
*/
+ if(!hObject) return FALSE;
+
if (0 != ((DWORD) hObject & GDI_HANDLE_STOCK_MASK))
{
DPRINT1("Trying to delete system object 0x%x\n", hObject);
I noticed GetObjectW in Wine is the same when a null object is used. It
does not SetLastError.
Modified: trunk/reactos/subsys/win32k/objects/dc.c
_____
Modified: trunk/reactos/subsys/win32k/objects/dc.c
--- trunk/reactos/subsys/win32k/objects/dc.c 2006-01-24 05:23:52 UTC
(rev 21007)
+++ trunk/reactos/subsys/win32k/objects/dc.c 2006-01-24 05:39:17 UTC
(rev 21008)
@@ -1,3 +1,4 @@
+
/*
* ReactOS W32 Subsystem
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
@@ -1788,6 +1789,9 @@
LPVOID SafeBuf;
NTSTATUS Status = STATUS_SUCCESS;
+ /* From Wine: GetObject does not SetLastError() on a null object */
+ if (!handle) return 0;
+
if (count <= 0)
{
return 0;