Final scrolling updates

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
2001-05-21 04:06:04 +00:00
parent 4cdc2c137e
commit cb71578cae

View File

@@ -332,6 +332,7 @@ bool wxWindow::Create(
{ {
HWND hParent = NULLHANDLE; HWND hParent = NULLHANDLE;
wxPoint vPos = rPos; // The OS/2 position wxPoint vPos = rPos; // The OS/2 position
ULONG ulCreateFlags = 0L;
wxCHECK_MSG(pParent, FALSE, wxT("can't create wxWindow without parent")); wxCHECK_MSG(pParent, FALSE, wxT("can't create wxWindow without parent"));
@@ -354,7 +355,20 @@ bool wxWindow::Create(
// //
// OS2 uses normal coordinates, no bassackwards Windows ones // OS2 uses normal coordinates, no bassackwards Windows ones
// //
nTempy = pParent->GetSize().y - (vPos.y + rSize.y); if (pParent->IsKindOf(CLASSINFO(wxGenericScrolledWindow)) ||
pParent->IsKindOf(CLASSINFO(wxScrolledWindow))
)
{
wxWindow* pGrandParent = NULL;
pGrandParent = pParent->GetParent();
if (pGrandParent)
nTempy = pGrandParent->GetSize().y - (vPos.y + rSize.y);
else
nTempy = pParent->GetSize().y - (vPos.y + rSize.y);
}
else
nTempy = pParent->GetSize().y - (vPos.y + rSize.y);
#if 0 #if 0
if (nTempy < 0) if (nTempy < 0)
{ {
@@ -364,6 +378,10 @@ bool wxWindow::Create(
} }
#endif #endif
vPos.y = nTempy; vPos.y = nTempy;
if ( pParent->IsKindOf(CLASSINFO(wxGenericScrolledWindow)) ||
pParent->IsKindOf(CLASSINFO(wxScrolledWindow))
)
ulCreateFlags |= WS_CLIPSIBLINGS;
} }
else else
{ {
@@ -374,9 +392,6 @@ bool wxWindow::Create(
vPos.y = vRect.yTop - (vPos.y + rSize.y); vPos.y = vRect.yTop - (vPos.y + rSize.y);
} }
ULONG ulCreateFlags = 0L;
// //
// Most wxSTYLES are really PM Class specific styles and will be // Most wxSTYLES are really PM Class specific styles and will be
// set in those class create procs. PM's basic windows styles are // set in those class create procs. PM's basic windows styles are
@@ -385,7 +400,7 @@ bool wxWindow::Create(
ulCreateFlags |= WS_VISIBLE; ulCreateFlags |= WS_VISIBLE;
if ( lStyle & wxCLIP_SIBLINGS ) if (lStyle & wxCLIP_SIBLINGS)
ulCreateFlags |= WS_CLIPSIBLINGS; ulCreateFlags |= WS_CLIPSIBLINGS;
if (lStyle & wxCLIP_CHILDREN ) if (lStyle & wxCLIP_CHILDREN )
@@ -907,15 +922,35 @@ void wxWindow::ScrollWindow(
{ {
wxWindow* pChildWin = pCurrent->GetData(); wxWindow* pChildWin = pCurrent->GetData();
::WinQueryWindowPos(pChildWin->GetHWND(), &vSwp); if (pChildWin->GetHWND() != NULLHANDLE)
::WinSetWindowPos( pChildWin->GetHWND() {
,HWND_TOP ::WinQueryWindowPos(pChildWin->GetHWND(), &vSwp);
,vSwp.x + nDx ::WinQueryWindowRect(pChildWin->GetHWND(), &vRect);
,vSwp.y + nDy if (pChildWin->GetHWND() == m_hWndScrollBarVert ||
,0 pChildWin->GetHWND() == m_hWndScrollBarHorz)
,0 {
, SWP_MOVE | SWP_SHOW ::WinSetWindowPos( pChildWin->GetHWND()
); ,HWND_TOP
,vSwp.x + nDx
,vSwp.y + nDy
,0
,0
,SWP_MOVE | SWP_SHOW | SWP_ZORDER
);
}
else
{
::WinSetWindowPos( pChildWin->GetHWND()
,HWND_BOTTOM
,vSwp.x + nDx
,vSwp.y + nDy
,0
,0
,SWP_MOVE | SWP_ZORDER
);
::WinInvalidateRect(pChildWin->GetHWND(), &vRect, FALSE);
}
}
pCurrent = pCurrent->GetNext(); pCurrent = pCurrent->GetNext();
} }
} // end of wxWindow::ScrollWindow } // end of wxWindow::ScrollWindow
@@ -2573,10 +2608,8 @@ bool wxWindow::OS2Create(
RECTL vParentRect; RECTL vParentRect;
HWND hWndClient; HWND hWndClient;
if (lX > -1L) lX1 = lX;
lX1 = lX; lY1 = lY;
if (lY > -1L)
lY1 = lY;
if (lWidth > -1L) if (lWidth > -1L)
lWidth1 = lWidth; lWidth1 = lWidth;
if (lHeight > -1L) if (lHeight > -1L)