]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/propsize/propsize.cpp
changes wxDirExists() to accept wxString instead of wxChar*, so that it can be used...
[wxWidgets.git] / samples / propsize / propsize.cpp
index 17680e7f076c1198cfe14a3faab874e647b694e8..51610d2712decb70b57a3b8b3899da3dc1c68cc1 100644 (file)
 // ----------------------------------------------------------------------------
 // headers
 // ----------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(__APPLE__)
-    #pragma implementation "propsize.cpp"
-    #pragma interface "propsize.cpp"
-#endif
 
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wxprec.h"
@@ -85,7 +81,7 @@ private:
 enum
 {
     // menu items
-    Minimal_Quit = 1,
+    Minimal_Quit = 1
 };
 
 // ----------------------------------------------------------------------------
@@ -118,6 +114,9 @@ IMPLEMENT_APP(MyApp)
 // `Main program' equivalent: the program execution "starts" here
 bool MyApp::OnInit()
 {
+    if ( !wxApp::OnInit() )
+        return false;
+
     // Create the main application window
     MyFrame *frame = new MyFrame(_T("Proportional resize"),
                                  wxPoint(50, 50), wxSize(450, 340));
@@ -164,9 +163,14 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
     SetStatusText(_T("Resize the frame to see how controls react"));
 #endif // wxUSE_STATUSBAR
 
-#define AddLine(orient) \
-    Add( new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxSize(2,2), orient), \
-    0, wxEXPAND)
+#if wxUSE_STATLINE
+    #define AddLine(orient) \
+        Add( new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxSize(2,2), orient), \
+        0, wxEXPAND)
+#else
+    #define AddLine(orient) \
+        Add( 2, 2)
+#endif // wxUSE_STATLINE
 
 #define AddButton(label,align) Add( \
     new wxButton( this, wxID_ANY, label, wxDefaultPosition, wxSize(100,50)), \