MSW compilation fixes for !wxUSE_VALIDATORS
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 6 Jan 2000 18:23:59 +0000 (18:23 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 6 Jan 2000 18:23:59 +0000 (18:23 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

14 files changed:
src/msw/bmpbuttn.cpp
src/msw/checkbox.cpp
src/msw/combobox.cpp
src/msw/fontenum.cpp
src/msw/gauge95.cpp
src/msw/gaugemsw.cpp
src/msw/listbox.cpp
src/msw/listctrl.cpp
src/msw/radiobut.cpp
src/msw/scrolbar.cpp
src/msw/slider95.cpp
src/msw/slidrmsw.cpp
src/msw/statbox.cpp
src/msw/tbar95.cpp

index 1d0e976dc35edc18a0620075ff2a32650bca5e8f..2cee20c982d46c2aa4b7b2f8d6a4c7f8938395fd 100644 (file)
@@ -39,7 +39,10 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit
 {
   m_buttonBitmap = bitmap;
   SetName(name);
+
+#if wxUSE_VALIDATORS
   SetValidator(validator);
+#endif // wxUSE_VALIDATORS
 
   parent->AddChild(this);
 
index fec4da27fc483f84635236f73d01c6417960e8df..3e8f8041858fd1817ff6b6cf725c94adcad211c5 100644 (file)
@@ -39,8 +39,8 @@
 // macros
 // ----------------------------------------------------------------------------
 
-    IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl)
-    IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox, wxCheckBox)
+IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl)
+IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox, wxCheckBox)
 
 // ============================================================================
 // implementation
@@ -60,14 +60,18 @@ bool wxCheckBox::MSWCommand(WXUINT WXUNUSED(param), WXWORD WXUNUSED(id))
 }
 
 // Single check box item
-bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
-           const wxPoint& pos,
-           const wxSize& size, long style,
-           const wxValidator& validator,
-           const wxString& name)
+bool wxCheckBox::Create(wxWindow *parent,
+                        wxWindowID id,
+                        const wxString& label,
+                        const wxPoint& pos,
+                        const wxSize& size, long style,
+                        const wxValidator& validator,
+                        const wxString& name)
 {
     SetName(name);
+#if wxUSE_VALIDATORS
     SetValidator(validator);
+#endif // wxUSE_VALIDATORS
     if (parent) parent->AddChild(this);
 
     SetBackgroundColour(parent->GetBackgroundColour()) ;
@@ -194,7 +198,9 @@ bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, const wxBitmap *l
            const wxString& name)
 {
   SetName(name);
+#if wxUSE_VALIDATORS
   SetValidator(validator);
+#endif // wxUSE_VALIDATORS
   if (parent) parent->AddChild(this);
 
   SetBackgroundColour(parent->GetBackgroundColour()) ;
index 9bab1a0cdb7b03407ffc888376d048d559a78a2c..8d6d7eada7d8f4af649890a8f42daa139c8503fb 100644 (file)
@@ -72,7 +72,9 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
                         const wxString& name)
 {
   SetName(name);
+#if wxUSE_VALIDATORS
   SetValidator(validator);
+#endif // wxUSE_VALIDATORS
   if (parent) parent->AddChild(this);
 //  SetBackgroundColour(parent->GetBackgroundColour()) ;
 
index d8faa72bb0da5a35db8ef58715965c88adff96fe..f21279e18273ab266b626171b9ed3805e7959c83 100644 (file)
@@ -111,11 +111,7 @@ bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding)
 }
 
 #if defined(__GNUWIN32__)
-    #if defined(__MINGW32__)
-        #define wxFONTENUMPROC FONTENUMPROC
-    #else
-        #define wxFONTENUMPROC int(*)(ENUMLOGFONTEX *, NEWTEXTMETRICEX*, int, LPARAM)
-    #endif
+    #define wxFONTENUMPROC int(*)(ENUMLOGFONTEX *, NEWTEXTMETRICEX*, int, LPARAM)
 #else
     #define wxFONTENUMPROC FONTENUMPROC
 #endif
index 0805a02f9811754134af42b5f7bbb548753a66fb..38b99d60dc660b1b6eff46d9355bcc9f02cc547c 100644 (file)
@@ -44,7 +44,9 @@ bool wxGauge95::Create(wxWindow *parent, wxWindowID id,
            const wxString& name)
 {
   SetName(name);
+#if wxUSE_VALIDATORS
   SetValidator(validator);
+#endif // wxUSE_VALIDATORS
 
   if (parent) parent->AddChild(this);
   m_rangeMax = range;
index 542c1231638dd064ba77987fabc5ca444b2b4484..cb8c2b91d518c5a132a13436bc8712fe2d351c33 100644 (file)
@@ -80,7 +80,9 @@ bool wxGaugeMSW::Create(wxWindow *parent, wxWindowID id,
   }
 
   SetName(name);
+#if wxUSE_VALIDATORS
   SetValidator(validator);
+#endif // wxUSE_VALIDATORS
 
   if (parent) parent->AddChild(this);
   m_rangeMax = range;
index 3b42780fcb8d738636e758bb12f3aeba9cc2bc30..128111853e8d173a71dfe3578d3a7fbb462c2f2f 100644 (file)
@@ -138,7 +138,9 @@ bool wxListBox::Create(wxWindow *parent,
     m_selected = 0;
 
     SetName(name);
+#if wxUSE_VALIDATORS
     SetValidator(validator);
+#endif // wxUSE_VALIDATORS
 
     if (parent)
         parent->AddChild(this);
index 8f09f1fcb3b7a6d03b8b1e8933f1a481f735222a..b74816ce5baf8d36293df3c8053027fc93d862f2 100644 (file)
@@ -126,7 +126,10 @@ bool wxListCtrl::Create(wxWindow *parent,
                         const wxValidator& validator,
                         const wxString& name)
 {
+#if wxUSE_VALIDATORS
     SetValidator(validator);
+#endif // wxUSE_VALIDATORS
+
     SetName(name);
 
     int x = pos.x;
index 67653ecc5d253ad574774a244eb077adf15e79c0..0f7b1dc92ea021ad41ed00800b588ad480d50511 100644 (file)
@@ -52,7 +52,9 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
            const wxString& name)
 {
   SetName(name);
+#if wxUSE_VALIDATORS
   SetValidator(validator);
+#endif // wxUSE_VALIDATORS
 
   if (parent) parent->AddChild(this);
 
index 2072573681a91a6544950d98ea7f7d9233cd2622..f5c9a867dde8b8d793abf80e9da5bdf94bd249d5 100644 (file)
@@ -48,7 +48,9 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
         return FALSE;
     parent->AddChild(this);
     SetName(name);
+#if wxUSE_VALIDATORS
     SetValidator(validator);
+#endif // wxUSE_VALIDATORS
     
     SetBackgroundColour(parent->GetBackgroundColour()) ;
     SetForegroundColour(parent->GetForegroundColour()) ;
index ef1e073fbf53b07de2b3eae4e8176eb049fff215..69af9112696afef235262b108398e1a397bc159c 100644 (file)
@@ -58,7 +58,9 @@ bool wxSlider95::Create(wxWindow *parent, wxWindowID id,
            const wxString& name)
 {
   SetName(name);
+#if wxUSE_VALIDATORS
   SetValidator(validator);
+#endif // wxUSE_VALIDATORS
 
   if (parent) parent->AddChild(this);
   SetBackgroundColour(parent->GetBackgroundColour()) ;
index 1bb9b0876d5c4013f5408c9bc5ffe41dd3d67cc9..7aa2ccfe031fc7b6a3bdbbc785f47cc10733f28f 100644 (file)
@@ -52,7 +52,9 @@ bool wxSliderMSW::Create(wxWindow *parent, wxWindowID id,
            const wxString& name)
 {
   SetName(name);
+#if wxUSE_VALIDATORS
   SetValidator(validator);
+#endif // wxUSE_VALIDATORS
 
   if (parent) parent->AddChild(this);
   SetBackgroundColour(parent->GetBackgroundColour()) ;
index f08e16db70b1ca8d8c44e6bd62898a487fe4cab8..da2eac0ecc87134ace69735bda6378301973f7c0 100644 (file)
@@ -59,7 +59,7 @@ bool wxStaticBox::Create(wxWindow *parent,
                          long style,
                          const wxString& name)
 {
-    if ( !CreateControl(parent, id, pos, size, style, name) )
+    if ( !CreateControl(parent, id, pos, size, style, wxDefaultValidator, name) )
         return FALSE;
 
     if ( !MSWCreateControl(wxT("BUTTON"), BS_GROUPBOX, pos, size, label, 0) )
index 6a84b47a6b48a8bd0906a175435a195bf681d3f7..bce6f600393f42f08ae9f58c075197fdd07162c9 100644 (file)
@@ -192,7 +192,7 @@ bool wxToolBar::Create(wxWindow *parent,
                        const wxString& name)
 {
     // common initialisation
-    if ( !CreateControl(parent, id, pos, size, style, name) )
+    if ( !CreateControl(parent, id, pos, size, style, wxDefaultValidator, name) )
         return FALSE;
 
     // prepare flags