X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7bdfb981a826d29e292738a27700543fa10d2bfb..85ac8ca017a0409e9762ed305ccc1d32a7c28fa7:/src/msw/slider95.cpp?ds=sidebyside diff --git a/src/msw/slider95.cpp b/src/msw/slider95.cpp index 1c723f2f21..36e29a5da7 100644 --- a/src/msw/slider95.cpp +++ b/src/msw/slider95.cpp @@ -121,7 +121,7 @@ bool wxSlider95::Create(wxWindow *parent, wxWindowID id, int value, int minValue, int maxValue, const wxPoint& pos, const wxSize& size, long style, - const wxValidator& wxVALIDATOR_PARAM(validator), + const wxValidator& validator, const wxString& name) { // default is no border @@ -143,11 +143,6 @@ bool wxSlider95::Create(wxWindow *parent, wxWindowID id, m_windowStyle = style; m_tickFreq = 0; - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - long msStyle = 0; long wstyle = 0; @@ -272,9 +267,13 @@ bool wxSlider95::Create(wxWindow *parent, wxWindowID id, } } - SetSize(x, y, width, height); + SetSize(pos.x, pos.y, size.x, size.y); SetValue(value); + // SetInitialBestSize is not called since we don't call MSWCreateControl + // for this control, so call SetBestSize here instead. + SetBestSize(size); + return TRUE; }