]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/notebook/test.cpp
latest CW additions
[wxWidgets.git] / samples / notebook / test.cpp
index feffe3ee587d32444ff461fee61541e5d50a0b84..4070a935bd20c305ae892b16a087c189aad8b0ce 100644 (file)
@@ -20,7 +20,6 @@
 #include "wx/wx.h"
 #endif
 
-#include "wx/tab.h"
 #include "test.h"
 
 // If 1, use a dialog. Otherwise use a frame.
@@ -44,11 +43,12 @@ bool MyApp::OnInit(void)
 #else
   frame = new MyFrame((wxFrame*) NULL, -1, (char *) "Notebook", wxPoint(-1, -1), wxSize(365, 390), wxDEFAULT_FRAME_STYLE);
 
-  // Problem with Motif whereby it doesn't size properly unless
-  // you set the size again (to a different size than before,
-  // since SetSize is optimized)
-#ifdef __WXMOTIF__
-  frame->SetSize(-1, -1, 370, 390);
+  // Problem with generic wxNotebook implementation whereby it doesn't size properly unless
+  // you set the size again
+#if defined(__WIN16__)
+  int width, height;
+  frame->GetSize(& width, & height);
+  frame->SetSize(-1, -1, width, height);
 #endif
 
   return TRUE;