#include <commdlg.h>
#endif
-#ifdef __SMARTPHONE__
+#if defined(__SMARTPHONE__) && defined(__WXWINCE__)
#include "wx/msw/wince/resources.h"
-#endif // __SMARTPHONE__
+#endif // __SMARTPHONE__ && __WXWINCE__
// ----------------------------------------------------------------------------
// wxWin macros
#endif
BEGIN_EVENT_TABLE(wxDialog, wxDialogBase)
-#ifdef __SMARTPHONE__
- EVT_MENU(wxID_OK, wxDialog::OnOK)
- EVT_MENU(wxID_APPLY, wxDialog::OnApply)
- EVT_MENU(wxID_CANCEL, wxDialog::OnCancel)
-#else
EVT_BUTTON(wxID_OK, wxDialog::OnOK)
EVT_BUTTON(wxID_APPLY, wxDialog::OnApply)
EVT_BUTTON(wxID_CANCEL, wxDialog::OnCancel)
-#endif
EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged)
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
-#ifdef __SMARTPHONE__
+#if defined(__SMARTPHONE__) && defined(__WXWINCE__)
SetLeftMenu(wxID_OK, _("OK"));
#endif
{
Init();
- Create(parent, -1, title, wxPoint(x, y), wxSize(w, h), style, name);
+ Create(parent, wxID_ANY, title, wxPoint(x, y), wxSize(w, h), style, name);
}
void wxDialog::SetModal(bool WXUNUSED(flag))
m_endModalCalled = true;
SetReturnCode(retCode);
- Show(false);
+ Hide();
+}
+
+void wxDialog::EndDialog(int rc)
+{
+ if ( IsModal() )
+ EndModal(rc);
+ else
+ Hide();
}
// ----------------------------------------------------------------------------
{
if ( Validate() && TransferDataFromWindow() )
{
- EndModal(wxID_OK);
+ EndDialog(wxID_OK);
}
}
void wxDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
{
- EndModal(wxID_CANCEL);
+ EndDialog(wxID_CANCEL);
}
void wxDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event))