int nPageSize = nThumbVisible;
SBCDATA vInfo;
HWND hWnd = GetHwnd();
- ULONG ulStyle = WS_VISIBLE;
+ ULONG ulStyle = WS_VISIBLE | WS_SYNCPAINT;
RECTL vRect;
::WinQueryWindowRect(hWnd, &vRect);
// registered as child windows of the window in order that child
// windows may be scrolled without scrolling the scrollbars themselves!
//
- m_hWndScrollBarHorz = ::WinCreateWindow( HWND_DESKTOP
+ m_hWndScrollBarHorz = ::WinCreateWindow( hWnd
,WC_SCROLLBAR
,(PSZ)NULL
,ulStyle
ulStyle |= SBS_VERT;
if (m_hWndScrollBarVert == 0L)
{
- m_hWndScrollBarVert = ::WinCreateWindow( HWND_DESKTOP
+ m_hWndScrollBarVert = ::WinCreateWindow( hWnd
,WC_SCROLLBAR
,(PSZ)NULL
,ulStyle
vRect2.xRight = pRect->x + pRect->width;
vRect2.yBottom = pRect->y;
}
+ else
+ {
+ ::WinQueryWindowRect(GetHwnd(), &vRect2);
+ ::WinQueryWindowRect(m_hWndScrollBarHorz, &vRect);
+ vRect2.yBottom += vRect.yTop - vRect.yBottom;
+ ::WinQueryWindowRect(m_hWndScrollBarVert, &vRect);
+ vRect2.xRight -= vRect.xRight - vRect.xLeft;
+ }
if (pRect)
::WinScrollWindow( GetHwnd()
,(LONG)nDx
,NULL
,NULLHANDLE
,NULL
- ,SW_SCROLLCHILDREN | SW_INVALIDATERGN
+ ,SW_INVALIDATERGN
);
else
::WinScrollWindow( GetHwnd()
,NULL
,NULLHANDLE
,NULL
- ,SW_SCROLLCHILDREN | SW_INVALIDATERGN
+ ,SW_INVALIDATERGN
);
+
+ //
+ // Move the children
+ wxWindowList::Node* pCurrent = GetChildren().GetFirst();
+ SWP vSwp;
+
+ while (pCurrent)
+ {
+ wxWindow* pChildWin = pCurrent->GetData();
+
+ ::WinQueryWindowPos(pChildWin->GetHWND(), &vSwp);
+ ::WinSetWindowPos( pChildWin->GetHWND()
+ ,HWND_TOP
+ ,vSwp.x + nDx
+ ,vSwp.y + nDy
+ ,0
+ ,0
+ , SWP_MOVE | SWP_SHOW
+ );
+ pCurrent = pCurrent->GetNext();
+ }
} // end of wxWindow::ScrollWindow
// ---------------------------------------------------------------------------