X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/422a142bc258d3170cd13f4a7d0471ce52203d7d..f9c3d39b217d372286ec6553261c0a12a8b6fabd:/src/msw/slider95.cpp diff --git a/src/msw/slider95.cpp b/src/msw/slider95.cpp index 3853c60447..36e29a5da7 100644 --- a/src/msw/slider95.cpp +++ b/src/msw/slider95.cpp @@ -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; }