git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27918
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#include <commdlg.h>
#endif
#include <commdlg.h>
#endif
+#ifdef __SMARTPHONE__
+ #include "wx/msw/wince/resources.h"
+#endif // __SMARTPHONE__
+
// ----------------------------------------------------------------------------
// wxWin macros
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// wxWin macros
// ----------------------------------------------------------------------------
#endif
BEGIN_EVENT_TABLE(wxDialog, wxDialogBase)
#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)
EVT_BUTTON(wxID_OK, wxDialog::OnOK)
EVT_BUTTON(wxID_APPLY, wxDialog::OnApply)
EVT_BUTTON(wxID_CANCEL, wxDialog::OnCancel)
EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged)
EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged)
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
+#ifdef __SMARTPHONE__
+ SetLeftMenu(wxID_OK, _("OK"));
+#endif
+
#ifdef __WXWINCE__
// react to pressing the OK button in the title
case WM_COMMAND:
#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 );
+#endif // __SMARTPHONE__
#endif
case WM_CLOSE:
// if we can't close, tell the system that we processed the
#endif
case WM_CLOSE:
// if we can't close, tell the system that we processed the
const wxString& name)
{
if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style, name) )
const wxString& name)
{
if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style, name) )
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE));
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE));
+#ifdef __SMARTPHONE__
+ SetLeftMenu(wxID_EXIT, _("Done"));
+#endif
+
+ return true;
#endif
#ifdef __SMARTPHONE__
#endif
#ifdef __SMARTPHONE__
- SetLeftMenu(wxID_EXIT, _("Done"));
SetRightMenu(); // to nothing for initialization
#endif
SetRightMenu(); // to nothing for initialization
#endif
#if defined(__WXWINCE__) && !defined(__WINCE_STANDARDSDK__) && !defined(__HANDHELDPC__)
SHINITDLGINFO shidi;
shidi.dwMask = SHIDIM_FLAGS;
#if defined(__WXWINCE__) && !defined(__WINCE_STANDARDSDK__) && !defined(__HANDHELDPC__)
SHINITDLGINFO shidi;
shidi.dwMask = SHIDIM_FLAGS;
- shidi.dwFlags = SHIDIF_DONEBUTTON |
- SHIDIF_SIZEDLGFULLSCREEN;
+ shidi.dwFlags = SHIDIF_SIZEDLGFULLSCREEN
+#ifndef __SMARTPHONE__
+ | SHIDIF_DONEBUTTON
+#endif
+ ;
shidi.hDlg = hDlg;
SHInitDialog( &shidi );
#else // no SHInitDialog()
shidi.hDlg = hDlg;
SHInitDialog( &shidi );
#else // no SHInitDialog()