From 55a667b6587880126de797796c823f986c36171c Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 18 Jan 2006 10:12:31 +0000 Subject: [PATCH] Applied patch [ 1382329 ] [msw] SetScrollbar: Set thumbsize before triggering events git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/window.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index e7129e32d5..08567e34a4 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -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) -- 2.45.2