EVT_FIND_CLOSE(-1, MyFrame::OnFindDialog)
#endif // wxUSE_FINDREPLDLG
EVT_MENU(wxID_EXIT, MyFrame::OnExit)
-
- EVT_BUTTON(DIALOGS_MODELESS_BTN, MyFrame::OnButton)
END_EVENT_TABLE()
BEGIN_EVENT_TABLE(MyModalDialog, wxDialog)
END_EVENT_TABLE()
BEGIN_EVENT_TABLE(MyModelessDialog, wxDialog)
+ EVT_BUTTON(DIALOGS_MODELESS_BTN, MyModelessDialog::OnButton)
+
EVT_CLOSE(MyModelessDialog::OnClose)
END_EVENT_TABLE()
void MyFrame::FileOpen(wxCommandEvent& WXUNUSED(event) )
{
+// wxFAIL_MSG( "Test assert" );
+
wxFileDialog dialog(this, "Testing open file dialog", "", "", "*.txt", 0);
if (dialog.ShowModal() == wxID_OK)
// one will use it by default
void MyFrame::FileOpen2(wxCommandEvent& WXUNUSED(event) )
{
+ wxOnAssert( "Test assert.txt", 20, "Test" );
+ return;
+
static wxString s_extDef;
wxString path = wxFileSelector(
_T("Select the file to load"),
}
}
-void MyFrame::OnButton(wxCommandEvent& WXUNUSED(event))
-{
- wxMessageBox("Button pressed in modeless dialog", "Info",
- wxOK | wxICON_INFORMATION, this);
-}
-
void MyFrame::ShowTip(wxCommandEvent& event)
{
#if wxUSE_STARTUP_TIPS
sizerTop->Fit(this);
}
+void MyModelessDialog::OnButton(wxCommandEvent& WXUNUSED(event))
+{
+ wxMessageBox("Button pressed in modeless dialog", "Info",
+ wxOK | wxICON_INFORMATION, this);
+}
+
void MyModelessDialog::OnClose(wxCloseEvent& event)
{
if ( event.CanVeto() )