file_menu->AppendSeparator();
file_menu->Append(wxID_EXIT, _T("E&xit\tAlt-X"));
-#if !defined( __SMARTPHONE__ )
wxMenuBar *menu_bar = new wxMenuBar;
menu_bar->Append(file_menu, _T("&File"));
frame->SetMenuBar(menu_bar);
-#else
- frame->SetRightMenu(wxID_ANY, _T("Menu"), file_menu);
-#endif // __SMARTPHONE__
myCanvas = new MyCanvas(frame);
myCanvas->SetBackgroundColour(*wxWHITE);
}
#endif // USE_FONTDLG_GENERIC
+#if wxUSE_LOG_DIALOG
void MyFrame::LogDialog(wxCommandEvent& WXUNUSED(event))
{
// calling wxYield() (as ~wxBusyCursor does) shouldn't result in messages
wxLogMessage(wxT("And this is the same dialog but with only one message."));
}
+#endif // wxUSE_LOG_DIALOG
void MyFrame::MessageBox(wxCommandEvent& WXUNUSED(event) )
{
if (dialog.ShowModal() == wxID_OK)
{
- wxMessageDialog dialog2(this, dialog.GetValue(), _T("Got string"));
- dialog2.ShowModal();
+ wxMessageBox(dialog.GetValue(), _T("Got string"), wxOK | wxICON_INFORMATION, this);
}
}
#endif // wxUSE_TEXTDLG
#ifdef __WXMOTIF__
_T("C++ files (*.cpp)|*.cpp")
#else
- _T("C++ files (*.h;*.cpp)|*.h;*.cpp")
+ _T("C++ files (*.cpp;*.h)|*.cpp;*.h")
#endif
);
#ifdef __WXMOTIF__
_T("C++ files (*.cpp)|*.cpp");
#else
- _T("All files (*.*)|*.*|C++ files (*.h;*.cpp)|*.h;*.cpp");
+ _T("All files (*.*)|*.*|C++ files (*.cpp;*.h)|*.cpp;*.h");
#endif
wxFileDialog dialog(this, _T("Testing open multiple file dialog"),
wxEmptyString, wxEmptyString, wildcards,
_T("Testing open file dialog"),
wxEmptyString,
wxEmptyString,
- _T("C++ files (*.h;*.cpp)|*.h;*.cpp")
+ _T("C++ files (*.cpp;*.h)|*.cpp;*.h")
);
dialog.SetDirectory(wxGetHomeDir());
void MyFrame::FilesOpenGeneric(wxCommandEvent& WXUNUSED(event) )
{
- wxString wildcards = _T("All files (*.*)|*.*|C++ files (*.h;*.cpp)|*.h;*.cpp");
+ wxString wildcards = _T("All files (*.*)|*.*|C++ files (*.cpp;*.h)|*.cpp;*.h");
wxGenericFileDialog dialog(this, _T("Testing open multiple file dialog"),
wxEmptyString, wxEmptyString, wildcards,
wxMULTIPLE);
dc.SetFont(wxGetApp().m_canvasFont);
dc.SetTextForeground(wxGetApp().m_canvasTextColour);
dc.SetBackgroundMode(wxTRANSPARENT);
- dc.DrawText(_T("wxWidgets common dialogs test application"), 10, 10);
+ dc.DrawText(
+ _T("wxWidgets common dialogs")
+#if !defined(__SMARTPHONE__)
+ _T(" test application")
+#endif
+ , 10, 10);
}
+#if USE_MODAL_PRESENTATION
+
// ----------------------------------------------------------------------------
// MyModelessDialog
// ----------------------------------------------------------------------------
event.Skip();
}
}
+
+#endif // USE_MODAL_PRESENTATION
+