Changeset 1057 for trunk/src/user32/dc.cpp
- Timestamp:
- Sep 26, 1999, 12:10:02 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/dc.cpp
r1042 r1057 1 /* $Id: dc.cpp,v 1. 4 1999-09-25 14:15:36sandervl Exp $ */1 /* $Id: dc.cpp,v 1.5 1999-09-26 10:09:58 sandervl Exp $ */ 2 2 3 3 /* … … 1287 1287 return (result); 1288 1288 } 1289 1290 1289 //****************************************************************************** 1291 1290 //****************************************************************************** 1292 1291 BOOL WIN32API ScrollWindow(HWND hwnd, int dx, int dy, const RECT *pScroll, const RECT *pClip) 1292 { 1293 Win32BaseWindow *window; 1294 APIRET rc; 1295 RECTL clientRect; 1296 RECTL scrollRect; 1297 RECTL clipRect; 1298 PRECTL pScrollRect = NULL; 1299 PRECTL pClipRect = NULL; 1300 ULONG scrollFlags = 0; 1301 1302 window = Win32BaseWindow::GetWindowFromHandle(hwnd); 1303 if(!window) { 1304 dprintf(("ScrollWindow, window %x not found", hwnd)); 1305 return 0; 1306 } 1307 dprintf(("ScrollWindow %x %d %d\n", hwnd, dx, dy)); 1308 MapWin32ToOS2Rectl(window->getClientRect(), (PRECTLOS2)&clientRect); 1309 if(pScroll) { 1310 MapWin32ToOS2Rectl((RECT *)pScroll, (PRECTLOS2)&scrollRect); 1311 pScrollRect = &scrollRect; 1312 1313 //Scroll rectangle relative to client area 1314 pScrollRect->xLeft += clientRect.xLeft; 1315 pScrollRect->xRight += clientRect.xLeft; 1316 pScrollRect->yTop += clientRect.yBottom; 1317 pScrollRect->yBottom += clientRect.yBottom; 1318 WinIntersectRect ((HAB) 0, pScrollRect, pScrollRect, &clientRect); 1319 } 1320 else scrollFlags |= SW_SCROLLCHILDREN; 1321 1322 if(pClip) { 1323 MapWin32ToOS2Rectl((RECT *)pClip, (PRECTLOS2)&clipRect); 1324 pClipRect = &clipRect; 1325 1326 //Clip rectangle relative to client area 1327 pClipRect->xLeft += clientRect.xLeft; 1328 pClipRect->xRight += clientRect.xLeft; 1329 pClipRect->yTop += clientRect.yBottom; 1330 pClipRect->yBottom += clientRect.yBottom; 1331 WinIntersectRect ((HAB) 0, pClipRect, pClipRect, &clientRect); 1332 } 1333 1334 dy = -dy; //always correct? 1335 1336 rc = WinScrollWindow(window->getOS2WindowHandle(), dx, dy, 1337 pScrollRect, pClipRect, NULLHANDLE, 1338 NULL, scrollFlags); 1339 1340 return (rc != RGN_ERROR); 1341 } 1342 //****************************************************************************** 1343 //TODO: Implement this one 1344 //****************************************************************************** 1345 INT WIN32API ScrollWindowEx(HWND hwnd, int dx, int dy, const RECT *pScroll, const RECT *pClip, 1346 HRGN hrgnUpdate, PRECT pRectUpdate, UINT scrollFlag) 1347 { 1348 dprintf(("USER32: ScrollWindowEx NOT CORRECTLY IMPLEMENTED\n")); 1349 return ScrollWindow(hwnd, dx, dy, pScroll, pClip); 1350 } 1351 //****************************************************************************** 1352 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.