[Win32k]
authorJames Tabor <james.tabor@reactos.org>
Thu, 13 Oct 2011 11:57:38 +0000 (11:57 +0000)
committerJames Tabor <james.tabor@reactos.org>
Thu, 13 Oct 2011 11:57:38 +0000 (11:57 +0000)
- Restore global class operations.
[ComCtl32]
- Use local class since this has higher priority over all global classes.
[Themes]
- Tested with XP Luna and two others. Rune and another Luna.

svn path=/trunk/; revision=54104

reactos/dll/win32/comctl32/theming.c
reactos/subsystems/win32/win32k/ntuser/class.c

index 6d81a48..d0c0a87 100644 (file)
@@ -119,7 +119,7 @@ void THEMING_Initialize (void)
     static const WCHAR refDataPropName[] = 
         { 'C','C','3','2','T','h','e','m','i','n','g','D','a','t','a',0 };
 
-    if (!IsThemeActive()) return;
+    if (!IsThemeActive()) return; // If so, un-register the class then register it again.
 
     atSubclassProp = GlobalAddAtomW (subclassPropName);
     atRefDataProp = GlobalAddAtomW (refDataPropName);
@@ -133,8 +133,7 @@ void THEMING_Initialize (void)
         GetClassInfoExW (NULL, subclasses[i].className, &class);
         originalProcs[i] = class.lpfnWndProc;
         class.lpfnWndProc = subclassProcs[i];
-        class.style |= CS_GLOBALCLASS;
-        class.hInstance = COMCTL32_hModule;
+        class.hInstance = COMCTL32_hModule; // Always set the instance so it can be found again.
         
         if (!class.lpfnWndProc)
         {
index 43ca287..d29f302 100644 (file)
@@ -1291,9 +1291,8 @@ UserRegisterClass(IN CONST WNDCLASSEXW* lpwcx,
 
        if (lpwcx->style & CS_GLOBALCLASS)
        {
-          /* HACK: allow global classes to be re-registered*/
           Class = IntFindClass( ClassAtom,
-                                lpwcx->hInstance,
+                                NULL,
                                &pi->pclsPublicList,
                                 NULL);