]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
Added files for wxNotebook and wxCocoaNSTabView
[wxWidgets.git] / src / msw / window.cpp
index fc14d47191c57d1cb5c91e35d86cf28d000d5bae..d0dca74f7918842342244c98625001be7f226846 100644 (file)
@@ -180,6 +180,8 @@ static inline void wxBringWindowToTop(HWND hwnd)
     }
 }
 
+#ifndef __WXWINCE__
+
 // ensure that all our parent windows have WS_EX_CONTROLPARENT style
 static void EnsureParentHasControlParentStyle(wxWindow *parent)
 {
@@ -196,7 +198,6 @@ static void EnsureParentHasControlParentStyle(wxWindow *parent)
        but if the parent doesn't have it, it wouldn't recurse inside it later
        on and so wouldn't have a chance of getting back to this window neither.
      */
-#ifndef __WXWINCE__
     while ( parent && !parent->IsTopLevel() )
     {
         LONG exStyle = ::GetWindowLong(GetHwndOf(parent), GWL_EXSTYLE);
@@ -209,9 +210,10 @@ static void EnsureParentHasControlParentStyle(wxWindow *parent)
 
         parent = parent->GetParent();
     }
-#endif // !__WXWINCE__
 }
 
+#endif // !__WXWINCE__
+
 // ---------------------------------------------------------------------------
 // event tables
 // ---------------------------------------------------------------------------
@@ -3096,6 +3098,7 @@ bool wxWindowMSW::MSWCreate(const wxChar *wclass,
     // do create the window
     wxWindowCreationHook hook(this);
 
+    // VZ: anyonce cares to explain why is this done for CE?
 #ifdef __WXWINCE__
     if (extendedStyle == 0)
     {
@@ -3112,7 +3115,7 @@ bool wxWindowMSW::MSWCreate(const wxChar *wclass,
             );
     }
     else
-#endif
+#endif // __WXWINCE__
     {
         m_hWnd = (WXHWND)::CreateWindowEx
             (
@@ -3896,16 +3899,14 @@ void wxWindowMSW::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event))
 
     // update the colours we use if they were not set explicitly by the user:
     // this must be done or OnCtlColor() would continue to use the old colours
-    if ( !m_hasFgCol )
+    if ( !m_hasFgCol || !m_hasBgCol )
     {
-        m_foregroundColour = wxSystemSettings::
-                                GetSystemColour(wxSYS_COLOUR_WINDOWTEXT);
-    }
+        wxVisualAttributes attrs = GetDefaultAttributes();
+        if ( !m_hasFgCol )
+            m_foregroundColour = attrs.colFg;
 
-    if ( !m_hasBgCol )
-    {
-        m_backgroundColour = wxSystemSettings::
-                                GetSystemColour(wxSYS_COLOUR_BTNFACE);
+        if ( !m_hasBgCol )
+            m_backgroundColour = attrs.colBg;
     }
 }