]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch [ 1382329 ] [msw] SetScrollbar: Set thumbsize before triggering events
authorJulian Smart <julian@anthemion.co.uk>
Wed, 18 Jan 2006 10:12:31 +0000 (10:12 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 18 Jan 2006 10:12:31 +0000 (10:12 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/window.cpp

index e7129e32d502e905c2fc52fae067a56231d956ef..08567e34a4507132a99a1393038082f4964e4134 100644 (file)
@@ -938,11 +938,13 @@ void wxWindowMSW::SetScrollbar(int orient,
     HWND hWnd = GetHwnd();
     if ( hWnd )
     {
     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);
     }
         ::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)
 }
 
 void wxWindowMSW::ScrollWindow(int dx, int dy, const wxRect *prect)