[ros-diffs] [jimtabor] 23388: Sync up Class.c to head.

jimtabor at svn.reactos.org jimtabor at svn.reactos.org
Mon Jul 31 07:48:26 CEST 2006


Author: jimtabor
Date: Mon Jul 31 09:48:26 2006
New Revision: 23388

URL: http://svn.reactos.org/svn/reactos?rev=23388&view=rev
Log:
Sync up Class.c to head.

Modified:
    branches/ros-branch-0_3_0/reactos/dll/win32/user32/windows/class.c

Modified: branches/ros-branch-0_3_0/reactos/dll/win32/user32/windows/class.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win32/user32/windows/class.c?rev=23388&r1=23387&r2=23388&view=diff
==============================================================================
--- branches/ros-branch-0_3_0/reactos/dll/win32/user32/windows/class.c (original)
+++ branches/ros-branch-0_3_0/reactos/dll/win32/user32/windows/class.c Mon Jul 31 09:48:26 2006
@@ -11,6 +11,8 @@
 
 #include <user32.h>
 
+#include <wine/debug.h>
+
 extern BOOL ControlsInitialized;
 
 /*
@@ -124,6 +126,11 @@
   {
     SetLastError(ERROR_INVALID_PARAMETER);
     return FALSE;
+  }
+
+  if ( hInstance == User32Instance )
+  {
+    hInstance = NULL;
   }
 
   w.cbSize = sizeof(w);
@@ -152,6 +159,11 @@
   {
     SetLastError(ERROR_INVALID_PARAMETER);
     return FALSE;
+  }
+
+  if ( hInstance == User32Instance )
+  {
+    hInstance = NULL;
   }
 
   w.cbSize = sizeof(w);
@@ -388,12 +400,12 @@
    SmallIconHeight = GetSystemMetrics(SM_CYSMICON);
    if (! GetIconInfo(StdIcon, &StdInfo))
    {
-      DbgPrint("Failed to get icon info for icon 0x%x\n", StdIcon);
+      DPRINT1("Failed to get icon info for icon 0x%x\n", StdIcon);
       goto cleanup;
    }
    if (! GetObjectW(StdInfo.hbmMask, sizeof(BITMAP), &StdBitmapInfo))
    {
-      DbgPrint("Failed to get bitmap info for icon 0x%x bitmap 0x%x\n",
+      DPRINT1("Failed to get bitmap info for icon 0x%x bitmap 0x%x\n",
               StdIcon, StdInfo.hbmColor);
       goto cleanup;
    }
@@ -410,71 +422,71 @@
    hInfoDc = CreateICW(NULL, NULL, NULL, NULL);
    if (NULL == hInfoDc)
    {
-      DbgPrint("Failed to create info DC\n");
+      DPRINT1("Failed to create info DC\n");
       goto cleanup;
    }
    hSourceDc = CreateCompatibleDC(NULL);
    if (NULL == hSourceDc)
    {
-      DbgPrint("Failed to create source DC\n");
+      DPRINT1("Failed to create source DC\n");
       goto cleanup;
    }
    hDestDc = CreateCompatibleDC(NULL);
    if (NULL == hDestDc)
    {
-      DbgPrint("Failed to create dest DC\n");
+      DPRINT1("Failed to create dest DC\n");
       goto cleanup;
    }
 
    OldSourceBitmap = SelectObject(hSourceDc, StdInfo.hbmColor);
    if (NULL == OldSourceBitmap)
    {
-      DbgPrint("Failed to select source color bitmap\n");
+      DPRINT1("Failed to select source color bitmap\n");
       goto cleanup;
    }
    SmallInfo.hbmColor = CreateCompatibleBitmap(hInfoDc, SmallIconWidth,
                                               SmallIconHeight);
    if (NULL == SmallInfo.hbmColor)
    {
-      DbgPrint("Failed to create color bitmap\n");
+      DPRINT1("Failed to create color bitmap\n");
       goto cleanup;
    }
    OldDestBitmap = SelectObject(hDestDc, SmallInfo.hbmColor);
    if (NULL == OldDestBitmap)
    {
-      DbgPrint("Failed to select dest color bitmap\n");
+      DPRINT1("Failed to select dest color bitmap\n");
       goto cleanup;
    }
    if (! StretchBlt(hDestDc, 0, 0, SmallIconWidth, SmallIconHeight,
                     hSourceDc, 0, 0, StdBitmapInfo.bmWidth,
                     StdBitmapInfo.bmHeight, SRCCOPY))
    {
-     DbgPrint("Failed to stretch color bitmap\n");
+     DPRINT1("Failed to stretch color bitmap\n");
      goto cleanup;
    }
 
    if (NULL == SelectObject(hSourceDc, StdInfo.hbmMask))
    {
-      DbgPrint("Failed to select source mask bitmap\n");
+      DPRINT1("Failed to select source mask bitmap\n");
       goto cleanup;
    }
    SmallInfo.hbmMask = CreateBitmap(SmallIconWidth, SmallIconHeight, 1, 1,
                                     NULL);
    if (NULL == SmallInfo.hbmMask)
    {
-      DbgPrint("Failed to create mask bitmap\n");
+      DPRINT1("Failed to create mask bitmap\n");
       goto cleanup;
    }
    if (NULL == SelectObject(hDestDc, SmallInfo.hbmMask))
    {
-      DbgPrint("Failed to select dest mask bitmap\n");
+      DPRINT1("Failed to select dest mask bitmap\n");
       goto cleanup;
    }
    if (! StretchBlt(hDestDc, 0, 0, SmallIconWidth, SmallIconHeight,
                     hSourceDc, 0, 0, StdBitmapInfo.bmWidth,
                     StdBitmapInfo.bmHeight, SRCCOPY))
    {
-      DbgPrint("Failed to stretch mask bitmap\n");
+      DPRINT1("Failed to stretch mask bitmap\n");
       goto cleanup;
    }
 
@@ -484,7 +496,7 @@
    SmallIcon = CreateIconIndirect(&SmallInfo);
    if (NULL == SmallIcon)
    {
-      DbgPrint("Failed to create icon\n");
+      DPRINT1("Failed to create icon\n");
       goto cleanup;
    }
 




More information about the Ros-diffs mailing list