]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
Added support for delayed deactivation of windows (for MDI)
[wxWidgets.git] / src / msw / window.cpp
index 54c791ddad23ac6cf5f5e0b1ef684e45ff4fc1cb..9c8a049a45272eaaff7c77371822b8bb4fb1f77b 100644 (file)
@@ -581,7 +581,7 @@ bool wxWindowMSW::Show(bool show)
     int cshow = show ? SW_SHOW : SW_HIDE;
     ::ShowWindow(hWnd, cshow);
 
-    if ( show )
+    if ( show && IsTopLevel() )
     {
         wxBringWindowToTop(hWnd);
     }
@@ -1028,6 +1028,12 @@ WXDWORD wxWindowMSW::MSWGetStyle(long flags, WXDWORD *exstyle) const
     if ( flags & wxCLIP_SIBLINGS )
         style |= WS_CLIPSIBLINGS;
 
+    if ( flags & wxVSCROLL )
+        style |= WS_VSCROLL;
+
+    if ( flags & wxHSCROLL )
+        style |= WS_HSCROLL;
+
     wxBorder border = (wxBorder)(flags & wxBORDER_MASK);
     
     // Check if we want to automatically give it a sunken style.
@@ -3738,6 +3744,9 @@ extern wxCOLORMAP *wxGetStdColourMap()
 
 bool wxWindowMSW::HandlePaint()
 {
+//    if (GetExtraStyle() & wxWS_EX_THEMED_BACKGROUND)
+//        return FALSE;
+    
 #ifdef __WIN32__
     HRGN hRegion = ::CreateRectRgn(0, 0, 0, 0); // Dummy call to get a handle
     if ( !hRegion )
@@ -3790,6 +3799,29 @@ bool wxWindowMSW::HandleEraseBkgnd(WXHDC hdc)
     if ( ::IsIconic(GetHwnd()) )
         return TRUE;
 
+#if 0
+    if (GetParent() && GetParent()->GetExtraStyle() & wxWS_EX_THEMED_BACKGROUND)
+    {
+        return FALSE;
+    }
+
+    if (GetExtraStyle() & wxWS_EX_THEMED_BACKGROUND)
+    {
+        if (wxUxThemeEngine::Get())
+        {
+            WXHTHEME hTheme = wxUxThemeEngine::Get()->m_pfnOpenThemeData(GetHWND(), L"TAB");
+            if (hTheme)
+            {
+                WXURECT rect;
+                ::GetClientRect((HWND) GetHWND(), (RECT*) & rect);
+                wxUxThemeEngine::Get()->m_pfnDrawThemeBackground(hTheme, hdc, 10 /* TABP_BODY */, 0, &rect, &rect);
+                wxUxThemeEngine::Get()->m_pfnCloseThemeData(hTheme);
+                return TRUE;
+            }
+        }
+    }
+#endif
+    
     wxDCTemp dc(hdc);
 
     dc.SetHDC(hdc);