]> git.saurik.com Git - wxWidgets.git/commitdiff
Disable non-standard notebook styles if CommCtl doesn't support them.
authorJulian Smart <julian@anthemion.co.uk>
Thu, 5 Jun 2003 13:35:50 +0000 (13:35 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 5 Jun 2003 13:35:50 +0000 (13:35 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
src/msw/notebook.cpp

index d6ec6e13e8f9da1646d0cbfcd60db906882d494f..92337016a7a19623a8ace2e9276056d00cf21568 100644 (file)
@@ -129,6 +129,12 @@ wxMSW:
   or if user's default locale is Unicode-only
 - Improved border handling so it no longer shows a thin and
   sunken border under XP
   or if user's default locale is Unicode-only
 - Improved border handling so it no longer shows a thin and
   sunken border under XP
+- partial fix for wxNotebook pages looking bad under XP: wxUSE_UXTHEME
+  enables XP theme engine code, and wxUSE_UXTHEME_AUTO tells
+  wxWindows to use the theme tab colour for control backgrounds.
+  Proper XP theme support is planned for 2.6
+- disable wxNB_RIGHT, wxNB_LEFT, wxNB_BOTTOM notebook styles
+  if the version of CommCtl doesn't support it (XP)
 
 wxMotif:
 
 
 wxMotif:
 
index 25ff1ce8a66998d9ef5a8bffdd3d350dc9c52b4c..dbca8ed2d2221e24183539328e4800715d8caf96 100644 (file)
@@ -32,6 +32,7 @@
 #include  "wx/event.h"
 #include  "wx/control.h"
 #include  "wx/notebook.h"
 #include  "wx/event.h"
 #include  "wx/control.h"
 #include  "wx/notebook.h"
+#include  "wx/app.h"
 
 #include  "wx/msw/private.h"
 
 
 #include  "wx/msw/private.h"
 
@@ -156,7 +157,20 @@ bool wxNotebook::Create(wxWindow *parent,
                         long style,
                         const wxString& name)
 {
                         long style,
                         const wxString& name)
 {
-    // base init
+    // Does ComCtl32 support non-top tabs?
+    int verComCtl32 = wxApp::GetComCtl32Version();
+    if ( verComCtl32 < 470 || verComCtl32 >= 600 )
+    {
+        if (style & wxNB_BOTTOM)
+            style &= ~wxNB_BOTTOM;
+        
+        if (style & wxNB_LEFT)
+            style &= ~wxNB_LEFT;
+        
+        if (style & wxNB_RIGHT)
+            style &= ~wxNB_RIGHT;
+    }
+    
     if ( !CreateControl(parent, id, pos, size, style | wxTAB_TRAVERSAL,
                         wxDefaultValidator, name) )
         return FALSE;
     if ( !CreateControl(parent, id, pos, size, style | wxTAB_TRAVERSAL,
                         wxDefaultValidator, name) )
         return FALSE;