]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/widgets.cpp
implemented wxTLW::InteractiveMove and mostly finished wxTLW/Univ
[wxWidgets.git] / samples / widgets / widgets.cpp
index ff4cee53d802327af2f6a71bae26a1a0a5c99bc7..59ee9950f08af02830dfc70069a3820a38825cf9 100644 (file)
@@ -173,13 +173,6 @@ WX_DEFINE_ARRAY(WidgetsPage *, ArrayWidgetsPage);
 
 IMPLEMENT_APP(WidgetsApp)
 
-#ifdef __WXUNIVERSAL__
-    #include "wx/univ/theme.h"
-
-    WX_USE_THEME(win32);
-    WX_USE_THEME(gtk);
-#endif // __WXUNIVERSAL__
-
 // ----------------------------------------------------------------------------
 // event tables
 // ----------------------------------------------------------------------------
@@ -199,19 +192,23 @@ END_EVENT_TABLE()
 
 bool WidgetsApp::OnInit()
 {
+    if ( !wxApp::OnInit() )
+        return FALSE;
+
     // the reason for having these ifdef's is that I often run two copies of
     // this sample side by side and it is useful to see which one is which
-    wxString title =
+    wxString title;
 #if defined(__WXUNIVERSAL__)
-    _T("wxUniv")
-#elif defined(__WXMSW__)
-    _T("wxMSW")
+    title = _T("wxUniv/");
+#endif
+
+#if defined(__WXMSW__)
+    title += _T("wxMSW");
 #elif defined(__WXGTK__)
-    _T("wxGTK")
+    title += _T("wxGTK");
 #else
-    _T("wxWindows")
+    title += _T("wxWindows");
 #endif
-    ;
 
     wxFrame *frame = new WidgetsFrame(title + _T(" widgets demo"));
     frame->Show();