]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/notebook.cpp
int argument/unsigned int arg warning fix
[wxWidgets.git] / src / msw / notebook.cpp
index 3f2390950ca0b731370110f07cf19c29acf3d690..db34763fd59b50369e785a359faf17b0de83b61a 100644 (file)
@@ -296,6 +296,15 @@ bool wxNotebook::Create(wxWindow *parent,
     if ( !MSWCreateControl(className, wxEmptyString, pos, size) )
         return false;
 
+    if (HasFlag(wxNB_NOPAGETHEME) || (wxSystemOptions::HasOption(wxT("msw.notebook.themed-background")) &&
+                                      wxSystemOptions::GetOptionInt(wxT("msw.notebook.themed-background")) == 0))
+    {
+        wxColour col = GetThemeBackgroundColour();
+        if (col.Ok())
+        {
+            SetBackgroundColour(col);
+        }
+    }
     return true;
 }
 
@@ -471,7 +480,7 @@ wxSize wxNotebook::CalcSizeFromPage(const wxSize& sizePage) const
     wxSize sizeTotal = sizePage;
 
     // We need to make getting tab size part of the wxWidgets API.
-    wxSize tabSize(0, 0);
+    wxSize tabSize;
     if (GetPageCount() > 0)
     {
         RECT rect;
@@ -618,7 +627,7 @@ bool wxNotebook::InsertPage(size_t nPage,
     }
 
     // and the text
-    if ( !strText.IsEmpty() )
+    if ( !strText.empty() )
     {
         tcItem.mask |= TCIF_TEXT;
         tcItem.pszText = (wxChar *)strText.c_str(); // const_cast
@@ -683,16 +692,6 @@ bool wxNotebook::InsertPage(size_t nPage,
 
     InvalidateBestSize();
 
-    if (HasFlag(wxNB_NOPAGETHEME) || (wxSystemOptions::HasOption(wxT("msw.notebook.themed-background")) &&
-                                      wxSystemOptions::GetOptionInt(wxT("msw.notebook.themed-background")) == 0))
-    {
-        wxColour col = GetThemeBackgroundColour();
-        if (col.Ok())
-        {
-            pPage->SetBackgroundColour(col);
-        }
-    }
-    
     return true;
 }