From 80a07196b3b9bdafcb36f99ec43accdda3113faa Mon Sep 17 00:00:00 2001 From: Stefan Neis Date: Mon, 27 Sep 2004 07:09:39 +0000 Subject: [PATCH] Re-simplified ScrollWindow routine. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29432 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/os2/window.cpp | 40 ++-------------------------------------- 1 file changed, 2 insertions(+), 38 deletions(-) diff --git a/src/os2/window.cpp b/src/os2/window.cpp index b23134b0a4..022caeb470 100644 --- a/src/os2/window.cpp +++ b/src/os2/window.cpp @@ -948,51 +948,15 @@ void wxWindowOS2::ScrollWindow( vRect.yBottom = vRect.yTop - pRect->height; } nDy *= -1; // flip the sign of Dy as OS/2 is opposite Windows. - HPS hPs; - HRGN vUpdateRegion; - hPs = ::WinGetPS(GetHwnd()); - vUpdateRegion = ::GpiCreateRegion(hPs, 0, NULL); ::WinScrollWindow( GetHwnd() ,(LONG)nDx ,(LONG)nDy ,&vRect ,&vRect - ,vUpdateRegion ,NULL - ,SW_SCROLLCHILDREN //| SW_INVALIDATERGN + ,NULL + ,SW_SCROLLCHILDREN | SW_INVALIDATERGN ); - RGNRECT vRgnData; - PRECTL pUpdateRects = NULL; - vRgnData.ulDirection = RECTDIR_LFRT_TOPBOT; - if (::GpiQueryRegionRects( hPs // Pres space - ,vUpdateRegion // Handle of region to query - ,NULL // Return all RECTs - ,&vRgnData // Will contain number or RECTs in region - ,NULL // NULL to return number of RECTs - )) - { - pUpdateRects = new RECTL[vRgnData.crcReturned]; - vRgnData.crc = vRgnData.crcReturned; - vRgnData.ircStart = 1; - if (::GpiQueryRegionRects( hPs // Pres space of source - ,vUpdateRegion // Handle of source region - ,NULL // Return all RECTs - ,&vRgnData // Operations set to return rects - ,pUpdateRects // Will contain the actual RECTS - )) - { - for(size_t i = 0; i < vRgnData.crc; i++) - { - wxRect UpdateRect; - UpdateRect.x = pUpdateRects[i].xLeft; - UpdateRect.y = height - pUpdateRects[i].yTop; - UpdateRect.width = pUpdateRects[i].xRight - pUpdateRects[i].xLeft; - UpdateRect.height = pUpdateRects[i].yTop - pUpdateRects[i].yBottom; - Refresh(FALSE, &UpdateRect); - } - delete [] pUpdateRects; - } - } } // end of wxWindowOS2::ScrollWindow // --------------------------------------------------------------------------- -- 2.45.2