]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dialog.cpp
Applied socket destruction bug patch
[wxWidgets.git] / src / msw / dialog.cpp
index edb0b0dab3eb08f87b3e52874a633852da18f41f..8ecdaa9680ac37f2d08c2ed41b2e4ef1b70acba2 100644 (file)
@@ -47,9 +47,9 @@
     #include <commdlg.h>
 #endif
 
-#ifdef __SMARTPHONE__
+#if defined(__SMARTPHONE__) && defined(__WXWINCE__)
     #include "wx/msw/wince/resources.h"
-#endif // __SMARTPHONE__
+#endif // __SMARTPHONE__ && __WXWINCE__
 
 // ----------------------------------------------------------------------------
 // wxWin macros
@@ -110,15 +110,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxTopLevelWindow)
 #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)
 
@@ -190,9 +184,7 @@ bool wxDialog::Create(wxWindow *parent,
     if ( !m_hasFont )
         SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
 
-    SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
-
-#ifdef __SMARTPHONE__
+#if defined(__SMARTPHONE__) && defined(__WXWINCE__)
     SetLeftMenu(wxID_OK, _("OK"));
 #endif
 
@@ -212,7 +204,7 @@ wxDialog::wxDialog(wxWindow *parent,
 {
     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))
@@ -437,12 +429,8 @@ void wxDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
 
 void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event))
 {
-#if wxUSE_CTL3D
-    Ctl3dColorChange();
-#else
     SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
     Refresh();
-#endif
 }
 
 // ---------------------------------------------------------------------------
@@ -538,18 +526,3 @@ WXLRESULT wxDialog::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lPar
     return rc;
 }
 
-#if wxUSE_CTL3D
-
-// Define for each class of dialog and control
-WXHBRUSH wxDialog::OnCtlColor(WXHDC WXUNUSED(pDC),
-                              WXHWND WXUNUSED(pWnd),
-                              WXUINT WXUNUSED(nCtlColor),
-                              WXUINT message,
-                              WXWPARAM wParam,
-                              WXLPARAM lParam)
-{
-    return (WXHBRUSH)Ctl3dCtlColorEx(message, wParam, lParam);
-}
-
-#endif // wxUSE_CTL3D
-