]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/calendar/calendar.cpp
check default library directories in WX_PATH_FIND_LIBRARIES; do *not* add default...
[wxWidgets.git] / samples / calendar / calendar.cpp
index 9cc91601f799fa23393f97a7b8086562dfa27ce8..a1226ce8d70e105b79027f4aee5cd3fc14ceb646 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(__APPLE__)
-    #pragma implementation "calendar.cpp"
-    #pragma interface "calendar.cpp"
-#endif
-
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wxprec.h"
 
@@ -39,6 +34,7 @@
     #include "wx/menu.h"
     #include "wx/layout.h"
     #include "wx/msgdlg.h"
+    #include "wx/icon.h"
 #endif
 
 #include "wx/sizer.h"
     #endif // wxUSE_DATEPICKCTRL_GENERIC
 #endif // wxUSE_DATEPICKCTRL
 
-// the application icon (under Windows and OS/2 it is in resources and even
-// though we could still include the XPM here it would be unused)
-#if !defined(__WXMSW__) && !defined(__WXPM__)
-    #include "../sample.xpm"
-#endif
+#include "../sample.xpm"
 
 // ----------------------------------------------------------------------------
 // private classes
@@ -282,7 +274,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
        : wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size)
 {
     // set the frame icon
-    SetIcon(wxICON(sample));
+    SetIcon(wxIcon(sample_xpm));
 
     // create a menu bar
     wxMenu *menuFile = new wxMenu;
@@ -595,7 +587,7 @@ MyDialog::MyDialog(wxWindow *parent, const wxDateTime& dt, int dtpStyle)
     wxStdDialogButtonSizer *sizerBtns = new wxStdDialogButtonSizer;
     sizerBtns->AddButton(new wxButton(this, wxID_OK));
     sizerBtns->AddButton(new wxButton(this, wxID_CANCEL));
-    sizerBtns->Finalise();
+    sizerBtns->Realize();
 
     wxSizer *sizerText = new wxBoxSizer(wxHORIZONTAL);
     sizerText->Add(new wxStaticText(this, wxID_ANY, _T("Date in ISO format: ")),