Fixed scrollbars return value to the SBM_SETRANGE and

SBM_SETRANGEREDRAW messages.
This commit is contained in:
Bobby Bingham 2001-05-31 21:30:06 +00:00 committed by Alexandre Julliard
parent 55d2e575af
commit aa5b6ce836
1 changed files with 13 additions and 5 deletions

View File

@ -1256,8 +1256,12 @@ static LRESULT WINAPI ScrollBarWndProc( HWND hwnd, UINT message, WPARAM wParam,
return 0;
case SBM_SETRANGE:
{
INT oldPos = GetScrollPos( hwnd, SB_CTL );
SetScrollRange( hwnd, SB_CTL, wParam, lParam, FALSE );
return 0; /* FIXME: return previous position */
if (oldPos != GetScrollPos( hwnd, SB_CTL )) return oldPos;
}
return 0;
case SBM_GETRANGE16:
FIXME("don't know how to handle SBM_GETRANGE16 (wp=%04x,lp=%08lx)\n", wParam, lParam );
@ -1272,8 +1276,12 @@ static LRESULT WINAPI ScrollBarWndProc( HWND hwnd, UINT message, WPARAM wParam,
return EnableScrollBar( hwnd, SB_CTL, wParam );
case SBM_SETRANGEREDRAW:
{
INT oldPos = GetScrollPos( hwnd, SB_CTL );
SetScrollRange( hwnd, SB_CTL, wParam, lParam, TRUE );
return 0; /* FIXME: return previous position */
if (oldPos != GetScrollPos( hwnd, SB_CTL )) return oldPos;
}
return 0;
case SBM_SETSCROLLINFO:
return SetScrollInfo( hwnd, SB_CTL, (SCROLLINFO *)lParam, wParam );