]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/richedit/wxLayout.cpp
Hopefully fixed library names generated by wx-config for OS/2's PM port.
[wxWidgets.git] / samples / richedit / wxLayout.cpp
index 54530007876726f5bc0eb93196c3c38e95fb62cd..f20d0fb0f270412f5419244c64289319ab2319d0 100644 (file)
@@ -76,9 +76,10 @@ MyFrame::MyFrame() :
    wxFrame( (wxFrame *) NULL, wxID_ANY, _T("wxLayout"),
              wxDefaultPosition, wxDefaultSize )
 {
+#if wxUSE_STATUSBAR
    CreateStatusBar( 2 );
-
-   SetStatusText( _T("wxLayout by Karsten Ballüder.") );
+   SetStatusText( _T("wxLayout by Karsten Ballueder.") );
+#endif // wxUSE_STATUSBAR
 
    wxMenuBar *menu_bar = new wxMenuBar();
 
@@ -128,7 +129,9 @@ MyFrame::MyFrame() :
    SetMenuBar( menu_bar );
 
    m_lwin = new wxLayoutWindow(this);
+#if wxUSE_STATUSBAR
    m_lwin->SetStatusBar(GetStatusBar(), 0, 1);
+#endif // wxUSE_STATUSBAR
    m_lwin->SetMouseTracking(true);
    m_lwin->SetEditable(true);
    m_lwin->SetWrapMargin(40);
@@ -180,14 +183,7 @@ void MyFrame::AddSampleText(wxLayoutList *llist)
    llist->LineBreak();
 
     llist->Insert(_T("Hello "));
-    wxBitmap *icon =
-#if wxICON_IS_BITMAP
-        new wxIcon(Micon_xpm)
-#else
-        new wxBitmap (wxIcon(Micon_xpm))
-#endif
-
-        ;
+    wxBitmap *icon = new wxBitmap (wxIcon(Micon_xpm));
 
     llist->Insert(new wxLayoutObjectIcon(icon));
     llist->SetFontWeight(wxBOLD);
@@ -523,7 +519,7 @@ void MyFrame::OnPageSetup(wxCommandEvent& WXUNUSED(event))
 #else
    wxGetApp().SetPrintMode(wxPRINT_POSTSCRIPT);
 #endif
-   wxPageSetupData data;
+   wxPageSetupDialogData data;
 
 #if defined(__WXMSW__) || defined(__WXMAC__)
    wxPageSetupDialog pageSetupDialog(this, & data);
@@ -532,7 +528,7 @@ void MyFrame::OnPageSetup(wxCommandEvent& WXUNUSED(event))
 #endif
    pageSetupDialog.ShowModal();
 
-   data = pageSetupDialog.GetPageSetupData();
+   data = pageSetupDialog.GetPageSetupDialogData();
 }
 
 void MyFrame::OnPrintSetupPS(wxCommandEvent& WXUNUSED(event))