Author: jimtabor
Date: Sun Mar 20 01:29:39 2011
New Revision: 51095

URL: http://svn.reactos.org/svn/reactos?rev=51095&view=rev
Log:
[User32]
- Finishing with setting window class types from the window proc. Next step 
will be checking it in the User32 message exchange instead of using the class 
structure. This was recognized with the MDI tests, this too could fix the combo 
listbox issue.
- Minor static test fixes and miscellaneous notes.

Modified:
    trunk/reactos/dll/win32/user32/controls/icontitle.c
    trunk/reactos/dll/win32/user32/controls/regcontrol.c
    trunk/reactos/dll/win32/user32/controls/scrollbar.c
    trunk/reactos/dll/win32/user32/controls/static.c
    trunk/reactos/dll/win32/user32/windows/menu.c

Modified: trunk/reactos/dll/win32/user32/controls/icontitle.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/icontitle.c?rev=51095&r1=51094&r2=51095&view=diff
==============================================================================
--- trunk/reactos/dll/win32/user32/controls/icontitle.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/controls/icontitle.c [iso-8859-1] Sun Mar 20 
01:29:39 2011
@@ -189,6 +189,18 @@
     HWND owner = GetWindow( hWnd, GW_OWNER );
 
     if (!IsWindow(hWnd)) return 0;
+#ifdef __REACTOS__ // Do this now, remove after Server side is fixed.
+    PWND pWnd;
+
+    pWnd = ValidateHwnd(hWnd);
+    if (pWnd)
+    {
+       if (!pWnd->fnid)
+       {
+          NtUserSetWindowFNID(hWnd, FNID_ICONTITLE);
+       }
+    }    
+#endif    
 
     switch( msg )
     {
@@ -201,6 +213,11 @@
                 hIconTitleFont = CreateFontIndirectA( &logFont );
             }
             return (hIconTitleFont ? 0 : -1);
+#ifdef __REACTOS__
+        case WM_DESTROY:
+          NtUserSetWindowFNID(hWnd, FNID_DESTROY);
+          break;
+#endif
        case WM_NCHITTEST:
             return HTCAPTION;
        case WM_NCMOUSEMOVE:

Modified: trunk/reactos/dll/win32/user32/controls/regcontrol.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/regcontrol.c?rev=51095&r1=51094&r2=51095&view=diff
==============================================================================
--- trunk/reactos/dll/win32/user32/controls/regcontrol.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/controls/regcontrol.c [iso-8859-1] Sun Mar 
20 01:29:39 2011
@@ -87,8 +87,23 @@
 WINAPI
 MsgWindowProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam )
 {
+    PWND pWnd;
+
+    pWnd = ValidateHwnd(hwnd);
+    if (pWnd)
+    {
+       if (!pWnd->fnid)
+       {
+          NtUserSetWindowFNID(hwnd, FNID_MESSAGEWND);
+       }
+    }
+
     if (message == WM_NCCREATE) return TRUE;
-    return 0;
+
+    if (message == WM_DESTROY)
+       NtUserSetWindowFNID(hwnd, FNID_DESTROY);
+
+    return DefWindowProc(hwnd, message, wParam, lParam );
 }
 
 LRESULT

Modified: trunk/reactos/dll/win32/user32/controls/scrollbar.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/scrollbar.c?rev=51095&r1=51094&r2=51095&view=diff
==============================================================================
--- trunk/reactos/dll/win32/user32/controls/scrollbar.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/controls/scrollbar.c [iso-8859-1] Sun Mar 20 
01:29:39 2011
@@ -1248,11 +1248,30 @@
       return 0;
     }
 
+#ifdef __REACTOS__ // Do this now, remove after Server side is fixed.
+  PWND pWnd;
+
+  pWnd = ValidateHwnd(Wnd);
+  if (pWnd)
+  {
+     if (!pWnd->fnid)
+     {
+        NtUserSetWindowFNID(Wnd, FNID_SCROLLBAR);
+     }
+  }    
+#endif    
+
   switch (Msg)
     {
       case WM_CREATE:
         IntScrollCreateScrollBar(Wnd, (LPCREATESTRUCTW) lParam);
         break;
+
+#ifdef __REACTOS__
+      case WM_DESTROY:
+        NtUserSetWindowFNID(Wnd, FNID_DESTROY);
+        return DefWindowProc(Wnd, Msg, wParam, lParam );
+#endif
 
 //#if 0 /* FIXME */
       case WM_ENABLE:

Modified: trunk/reactos/dll/win32/user32/controls/static.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/static.c?rev=51095&r1=51094&r2=51095&view=diff
==============================================================================
--- trunk/reactos/dll/win32/user32/controls/static.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/controls/static.c [iso-8859-1] Sun Mar 20 
01:29:39 2011
@@ -813,6 +813,9 @@
     GetClientRect( hwnd, &rc);
 
     /* FIXME: send WM_CTLCOLORSTATIC */
+#ifdef __REACTOS__
+    hBrush = STATIC_SendWmCtlColorStatic(hwnd, hdc); // Always sent....
+#endif
     switch (style & SS_TYPEMASK)
     {
     case SS_BLACKRECT:

Modified: trunk/reactos/dll/win32/user32/windows/menu.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/menu.c?rev=51095&r1=51094&r2=51095&view=diff
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/menu.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/menu.c [iso-8859-1] Sun Mar 20 
01:29:39 2011
@@ -1792,9 +1792,24 @@
   MenuCleanupRosMenuItemInfo(&ItemInfo);
 }
 
+//
+// This breaks some test results. Should handle A2U if called!
+//
 LRESULT WINAPI PopupMenuWndProcA(HWND Wnd, UINT Message, WPARAM wParam, LPARAM 
lParam)
 {
   TRACE("YES! hwnd=%x msg=0x%04x wp=0x%04lx lp=0x%08lx\n", Wnd, Message, 
wParam, lParam);
+#ifdef __REACTOS__
+  PWND pWnd;
+
+  pWnd = ValidateHwnd(Wnd);
+  if (pWnd)
+  {
+     if (!pWnd->fnid)
+     {
+        NtUserSetWindowFNID(Wnd, FNID_MENU);
+     }
+  }    
+#endif    
 
   switch(Message)
     {
@@ -1834,6 +1849,9 @@
           top_popup = NULL;
           top_popup_hmenu = NULL;
         }
+#ifdef __REACTOS__
+      NtUserSetWindowFNID(Wnd, FNID_DESTROY);
+#endif
       break;
 
     case WM_SHOWWINDOW:
@@ -1868,6 +1886,18 @@
 PopupMenuWndProcW(HWND Wnd, UINT Message, WPARAM wParam, LPARAM lParam)
 {
   TRACE("hwnd=%x msg=0x%04x wp=0x%04lx lp=0x%08lx\n", Wnd, Message, wParam, 
lParam);
+#ifdef __REACTOS__ // Do this now, remove after Server side is fixed.
+  PWND pWnd;
+
+  pWnd = ValidateHwnd(Wnd);
+  if (pWnd)
+  {
+     if (!pWnd->fnid)
+     {
+        NtUserSetWindowFNID(Wnd, FNID_MENU);
+     }
+  }    
+#endif    
 
   switch(Message)
     {
@@ -1907,6 +1937,9 @@
           top_popup = NULL;
           top_popup_hmenu = NULL;
         }
+#ifdef __REACTOS__
+      NtUserSetWindowFNID(Wnd, FNID_DESTROY);
+#endif
       break;
 
     case WM_SHOWWINDOW:


Reply via email to