X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/55cca86849db86abe32f10db475a1e3e9bf461bb..e81a301cbdc8729b0a71fa5dfd7124bf59368673:/src/generic/numdlgg.cpp diff --git a/src/generic/numdlgg.cpp b/src/generic/numdlgg.cpp index 17236fc66b..9fa5693a4d 100644 --- a/src/generic/numdlgg.cpp +++ b/src/generic/numdlgg.cpp @@ -18,7 +18,6 @@ // ---------------------------------------------------------------------------- #ifdef __GNUG__ - #pragma interface "numdlgg.cpp" #pragma implementation "numdlgg.cpp" #endif @@ -29,6 +28,8 @@ #pragma hdrstop #endif +#if wxUSE_NUMBERDLG + #ifndef WX_PRECOMP #include @@ -45,10 +46,12 @@ #include "wx/statline.h" #endif +#if !defined(__WIN16__) && wxUSE_SPINCTRL #include "wx/spinctrl.h" +#endif // this is where wxGetNumberFromUser() is declared -#include "wx/generic/textdlgg.h" +#include "wx/textdlg.h" #if !wxUSE_SPINCTRL // wxTextCtrl will do instead of wxSpinCtrl if we don't have it @@ -129,7 +132,9 @@ wxNumberEntryDialog::wxNumberEntryDialog(wxWindow *parent, wxString valStr; valStr.Printf(wxT("%lu"), m_value); m_spinctrl = new wxSpinCtrl(this, -1, valStr, wxDefaultPosition, wxSize( 140, -1 ) ); - m_spinctrl->SetRange(m_min, m_max); +#if !defined(__WIN16__) && wxUSE_SPINCTRL + m_spinctrl->SetRange((int)m_min, (int)m_max); +#endif inputsizer->Add( m_spinctrl, 1, wxCENTER | wxLEFT | wxRIGHT, 10 ); // add both topsizer->Add( inputsizer, 1, wxEXPAND | wxLEFT|wxRIGHT, 5 ); @@ -202,3 +207,5 @@ long wxGetNumberFromUser(const wxString& msg, return dialog.GetValue(); } + +#endif // wxUSE_NUMBERDLG