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,6 +355,19 @@ bool wxWindow::Create(
// //
// OS2 uses normal coordinates, no bassackwards Windows ones // OS2 uses normal coordinates, no bassackwards Windows ones
// //
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); 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
@@ -907,15 +922,35 @@ void wxWindow::ScrollWindow(
{ {
wxWindow* pChildWin = pCurrent->GetData(); wxWindow* pChildWin = pCurrent->GetData();
if (pChildWin->GetHWND() != NULLHANDLE)
{
::WinQueryWindowPos(pChildWin->GetHWND(), &vSwp); ::WinQueryWindowPos(pChildWin->GetHWND(), &vSwp);
::WinQueryWindowRect(pChildWin->GetHWND(), &vRect);
if (pChildWin->GetHWND() == m_hWndScrollBarVert ||
pChildWin->GetHWND() == m_hWndScrollBarHorz)
{
::WinSetWindowPos( pChildWin->GetHWND() ::WinSetWindowPos( pChildWin->GetHWND()
,HWND_TOP ,HWND_TOP
,vSwp.x + nDx ,vSwp.x + nDx
,vSwp.y + nDy ,vSwp.y + nDy
,0 ,0
,0 ,0
, SWP_MOVE | SWP_SHOW ,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,9 +2608,7 @@ bool wxWindow::OS2Create(
RECTL vParentRect; RECTL vParentRect;
HWND hWndClient; HWND hWndClient;
if (lX > -1L)
lX1 = lX; lX1 = lX;
if (lY > -1L)
lY1 = lY; lY1 = lY;
if (lWidth > -1L) if (lWidth > -1L)
lWidth1 = lWidth; lWidth1 = lWidth;