#include <commdlg.h>
#endif
+#ifdef __SMARTPHONE__
+ #include "wx/msw/wince/resources.h"
+#endif // __SMARTPHONE__
+
// ----------------------------------------------------------------------------
// wxWin macros
// ----------------------------------------------------------------------------
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
+#ifdef __SMARTPHONE__
+ SetLeftMenu(wxID_OK, _("OK"));
+#endif
+
return true;
}
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))
#ifdef __WXWINCE__
// react to pressing the OK button in the title
case WM_COMMAND:
- if (LOWORD(wParam) == IDOK)
+ {
+ switch ( LOWORD(wParam) )
{
- wxButton *btn = wxDynamicCast(FindWindow(wxID_CANCEL), wxButton);
- if ( btn && btn->IsEnabled() )
- {
- // if we do have a cancel button, do press it
- btn->MSWCommand(BN_CLICKED, 0 /* unused */);
- processed = true;
+#ifndef __SMARTPHONE__
+ case IDOK:
+ wxButton *btn = wxDynamicCast(FindWindow(wxID_CANCEL), wxButton);
+ if ( btn && btn->IsEnabled() )
+ {
+ // if we do have a cancel button, do press it
+ btn->MSWCommand(BN_CLICKED, 0 /* unused */);
+ processed = true;
+ break;
+ }
+#else // ifdef __SMARTPHONE__
+ case IDM_LEFT:
+ case IDM_RIGHT:
+ processed = HandleCommand( LOWORD(wParam) , 0 , NULL );
break;
- }
+#endif // __SMARTPHONE__
}
break;
+ }
#endif
case WM_CLOSE:
// if we can't close, tell the system that we processed the