]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
Applied patch [ 1399013 ] More removals of extraneous semicolons
[wxWidgets.git] / src / msw / window.cpp
index e7129e32d502e905c2fc52fae067a56231d956ef..08567e34a4507132a99a1393038082f4964e4134 100644 (file)
@@ -938,11 +938,13 @@ void wxWindowMSW::SetScrollbar(int orient,
     HWND hWnd = GetHwnd();
     if ( hWnd )
     {
+        // We have to set the variables here to make them valid in events
+        // triggered by ::SetScrollInfo()
+        *(orient == wxHORIZONTAL ? &m_xThumbSize : &m_yThumbSize) = pageSize;
+        
         ::SetScrollInfo(hWnd, orient == wxHORIZONTAL ? SB_HORZ : SB_VERT,
                         &info, refresh);
     }
-
-    *(orient == wxHORIZONTAL ? &m_xThumbSize : &m_yThumbSize) = pageSize;
 }
 
 void wxWindowMSW::ScrollWindow(int dx, int dy, const wxRect *prect)