win32ss/user/ntuser/scrollbar.c | 12 ++++++------ win32ss/user/user32/windows/defwnd.c | 22 ---------------------- 2 files changed, 6 insertions(+), 28 deletions(-) diff --git a/win32ss/user/ntuser/scrollbar.c b/win32ss/user/ntuser/scrollbar.c index 325be6fe49..bd101ba4d9 100644 --- a/win32ss/user/ntuser/scrollbar.c +++ b/win32ss/user/ntuser/scrollbar.c @@ -211,7 +211,7 @@ IntCalculateThumb(PWND Wnd, LONG idObject, PSCROLLBARINFO psbi, PSBDATA pSBData) psbi->rgstate[SBRG_BOTTOMLEFTBTN] == STATE_SYSTEM_UNAVAILABLE && pSBData->posMin >= (int)(pSBData->posMax - max(pSBData->page - 1, 0))) { - /* Nothing to scroll */ + psbi->xyThumbTop = 0; psbi->xyThumbBottom = 0; } @@ -286,7 +286,6 @@ co_IntGetScrollInfo(PWND Window, INT nBar, PSBDATA pSBData, LPSCROLLINFO lpsi) return FALSE; } - psi = IntGetScrollInfoFromWindow(Window, nBar); if (lpsi->fMask == SIF_ALL) { @@ -299,22 +298,23 @@ co_IntGetScrollInfo(PWND Window, INT nBar, PSBDATA pSBData, LPSCROLLINFO lpsi) if (0 != (Mask & SIF_PAGE)) { - lpsi->nPage = psi->nPage; + lpsi->nPage = pSBData->page; } if (0 != (Mask & SIF_POS)) { - lpsi->nPos = psi->nPos; + lpsi->nPos = pSBData->pos; } if (0 != (Mask & SIF_RANGE)) { - lpsi->nMin = psi->nMin; - lpsi->nMax = psi->nMax; + lpsi->nMin = pSBData->posMin; + lpsi->nMax = pSBData->posMax; } if (0 != (Mask & SIF_TRACKPOS)) { + psi = IntGetScrollInfoFromWindow(Window, nBar); lpsi->nTrackPos = psi->nTrackPos; } diff --git a/win32ss/user/user32/windows/defwnd.c b/win32ss/user/user32/windows/defwnd.c index baa31e7af0..779cb5479f 100644 --- a/win32ss/user/user32/windows/defwnd.c +++ b/win32ss/user/user32/windows/defwnd.c @@ -825,17 +825,6 @@ RealDefWindowProcA(HWND hWnd, { case WM_NCCREATE: { - if ( Wnd && - Wnd->style & (WS_HSCROLL | WS_VSCROLL) ) - { - if (!Wnd->pSBInfo) - { - SCROLLINFO si = {sizeof si, SIF_ALL, 0, 100, 0, 0, 0}; - SetScrollInfo( hWnd, SB_HORZ, &si, FALSE ); - SetScrollInfo( hWnd, SB_VERT, &si, FALSE ); - } - } - if (lParam) { LPCREATESTRUCTA cs = (LPCREATESTRUCTA)lParam; @@ -1033,17 +1022,6 @@ RealDefWindowProcW(HWND hWnd, { case WM_NCCREATE: { - if ( Wnd && - Wnd->style & (WS_HSCROLL | WS_VSCROLL) ) - { - if (!Wnd->pSBInfo) - { - SCROLLINFO si = {sizeof si, SIF_ALL, 0, 100, 0, 0, 0}; - SetScrollInfo( hWnd, SB_HORZ, &si, FALSE ); - SetScrollInfo( hWnd, SB_VERT, &si, FALSE ); - } - } - if (lParam) { LPCREATESTRUCTW cs = (LPCREATESTRUCTW)lParam;