UI regression
Duane Clark
junkmail at junkmail.com
Fri Mar 1 16:46:43 CST 2002
Duane Clark wrote:
> By coincidence, I was just working a problem where scrollbars were not
> being drawn, so perhaps try this patch.
Ackk!!! Wrong one. How about this one (sorry).
--
My real email is akamail.com at dclark (or something like that).
-------------- next part --------------
--- controls/scroll.c.orig Fri Mar 1 14:22:05 2002
+++ controls/scroll.c Fri Mar 1 14:06:58 2002
@@ -1736,6 +1736,8 @@
BOOL fShowH, BOOL fShowV )
{
LONG style = GetWindowLongW( hwnd, GWL_STYLE );
+ INT action, retVal;
+ SCROLLINFO scrollInfo;
TRACE("hwnd=%04x bar=%d horz=%d, vert=%d\n",
hwnd, nBar, fShowH, fShowV );
@@ -1757,6 +1759,14 @@
{
fShowH = (style & WS_HSCROLL);
style &= ~WS_HSCROLL;
+ /* MS sets these values when the scrollbar is hidden */
+ scrollInfo.cbSize = sizeof(SCROLLINFO);
+ scrollInfo.nMin = 0;
+ scrollInfo.nMax = 0;
+ scrollInfo.nPos = 0;
+ scrollInfo.nPage = 1;
+ scrollInfo.fMask = SIF_ALL;
+ SCROLL_SetScrollInfo( hwnd, SB_HORZ, &scrollInfo, &action );
}
if( nBar == SB_HORZ ) {
fShowV = FALSE;
@@ -1774,6 +1784,14 @@
{
fShowV = (style & WS_VSCROLL);
style &= ~WS_VSCROLL;
+ /* MS sets these values when the scrollbar is hidden */
+ scrollInfo.cbSize = sizeof(SCROLLINFO);
+ scrollInfo.nMin = 0;
+ scrollInfo.nMax = 0;
+ scrollInfo.nPos = 0;
+ scrollInfo.nPage = 1;
+ scrollInfo.fMask = SIF_ALL;
+ SCROLL_SetScrollInfo( hwnd, SB_VERT, &scrollInfo, &action );
}
if ( nBar == SB_VERT )
fShowH = FALSE;
More information about the wine-users
mailing list