[ros-diffs] [jimtabor] 54261: [User32] - Icon title, menu and scroll bar do not set the death bit. Menu and scroll bar set the id only on specific window messages.

jimtabor at svn.reactos.org jimtabor at svn.reactos.org
Fri Oct 28 12:00:09 UTC 2011


Author: jimtabor
Date: Fri Oct 28 12:00:07 2011
New Revision: 54261

URL: http://svn.reactos.org/svn/reactos?rev=54261&view=rev
Log:
[User32]
- Icon title, menu and scroll bar do not set the death bit. Menu and scroll bar set the id only on specific window messages.


Modified:
    trunk/reactos/dll/win32/user32/controls/icontitle.c
    trunk/reactos/dll/win32/user32/controls/scrollbar.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=54261&r1=54260&r2=54261&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] Fri Oct 28 12:00:07 2011
@@ -189,27 +189,6 @@
 {
     HWND owner = GetWindow( hWnd, GW_OWNER );
 
-#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);
-       }
-       else
-       {
-          if (pWnd->fnid != FNID_ICONTITLE)
-          {
-             ERR("Wrong window class for IconTitle!\n");
-             return 0;
-          }
-       }
-    }    
-#endif    
-
     if (!IsWindow(hWnd)) return 0;
 
     switch( msg )
@@ -223,12 +202,6 @@
                 hIconTitleFont = CreateFontIndirectA( &logFont );
             }
             return (hIconTitleFont ? 0 : -1);
-#ifdef __REACTOS__
-        case WM_NCDESTROY:
-          NtUserSetWindowFNID(hWnd, FNID_DESTROY);
-        case WM_DESTROY:
-          break;
-#endif
 	case WM_NCHITTEST:
 	     return HTCAPTION;
 	case WM_NCMOUSEMOVE:

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=54261&r1=54260&r2=54261&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] Fri Oct 28 12:00:07 2011
@@ -110,7 +110,7 @@
     */
    if (nBar == SB_CTL)
    {
-      hBrush = (HBRUSH)SendMessageW(GetParent(hWnd), WM_CTLCOLORSCROLLBAR, (WPARAM)hDC, (LPARAM)hWnd);
+      hBrush = GetControlBrush( hWnd, hDC, WM_CTLCOLORSCROLLBAR);
       if (!hBrush)
          hBrush = GetSysColorBrush(COLOR_SCROLLBAR);
    }
@@ -1251,6 +1251,10 @@
   {
      if (!pWnd->fnid)
      {
+        if (Msg != WM_CREATE)
+        {
+           return DefWindowProc(Wnd, Msg, wParam, lParam);
+        }
         NtUserSetWindowFNID(Wnd, FNID_SCROLLBAR);
      }
      else
@@ -1274,15 +1278,6 @@
       case WM_CREATE:
         IntScrollCreateScrollBar(Wnd, (LPCREATESTRUCTW) lParam);
         break;
-
-#ifdef __REACTOS__
-      case WM_DESTROY:
-        return DefWindowProc(Wnd, Msg, wParam, lParam );
-
-      case WM_NCDESTROY:
-        NtUserSetWindowFNID(Wnd, FNID_DESTROY);
-        break;
-#endif
 
 //#if 0 /* FIXME */
       case WM_ENABLE:

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=54261&r1=54260&r2=54261&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] Fri Oct 28 12:00:07 2011
@@ -1899,6 +1899,10 @@
   {
      if (!pWnd->fnid)
      {
+        if (Message != WM_NCCREATE)
+        {
+           return DefWindowProcW(Wnd, Message, wParam, lParam);
+        }
         NtUserSetWindowFNID(Wnd, FNID_MENU);
      }
      else
@@ -1953,12 +1957,6 @@
           top_popup_hmenu = NULL;
         }
       break;
-
-#ifdef __REACTOS__
-    case WM_NCDESTROY:
-      NtUserSetWindowFNID(Wnd, FNID_DESTROY);
-      break;
-#endif
 
     case WM_SHOWWINDOW:
       if (0 != wParam)




More information about the Ros-diffs mailing list