Changeset 385 for trunk/src/user32/new/oslibgdi.cpp
- Timestamp:
- Jul 24, 1999, 4:01:45 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/oslibgdi.cpp
r342 r385 1 /* $Id: oslibgdi.cpp,v 1. 4 1999-07-20 07:42:35sandervl Exp $ */1 /* $Id: oslibgdi.cpp,v 1.5 1999-07-24 14:01:44 sandervl Exp $ */ 2 2 /* 3 3 * Window GDI wrapper functions for OS/2 … … 49 49 hwndParent = HWND_DESKTOP; 50 50 } 51 if(WinMapWindowPoints(hwndChild, hwndParent, (POINTL *)point, 1) != 0) {51 if(WinMapWindowPoints(hwndChild, hwndParent, (POINTL *)point, 1) != TRUE) { 52 52 dprintf(("MapOS2ToWin32Point:WinMapWindowPoint %x %x returned false", hwndParent, hwndChild)); 53 53 return FALSE; … … 55 55 WinQueryWindowRect(hwndParent, (PRECTL)&rectParent); 56 56 point->y = rectParent.yTop - point->y - 1; 57 return TRUE; 58 } 59 //****************************************************************************** 60 // MapOS2ToWin32Rect 61 // Map os/2 rectangle to screen coordinates and convert to win32 rect 62 // 63 // Parameters: 64 // hwndParent: Parent window handle 65 // hwndChild: Child window handle 66 // rectOS2: OS/2 child window RECTL 67 // rectWin32: Win32 Child window RECT (IN) 68 // 69 // Returns: 70 // TRUE: Success 71 // FALSE: Failures 72 //****************************************************************************** 73 BOOL MapOS2ToWin32Rectl(HWND hwndParent, HWND hwndChild, PRECTLOS2 rectOS2, PRECT rectWin32) 74 { 75 RECTLOS2 rectParent = {0}; 76 77 if(hwndParent == OSLIB_HWND_DESKTOP) { 78 hwndParent = HWND_DESKTOP; 79 } 80 if(WinMapWindowPoints(hwndChild, hwndParent, (PPOINTL)rectOS2, 2) != TRUE) { 81 dprintf(("MapOS2ToWin32Rect:WinMapWindowPoint %x %x returned false", hwndParent, hwndChild)); 82 return FALSE; 83 } 84 85 ULONG length = rectOS2->yTop - rectOS2->yBottom; 86 87 rectWin32->bottom = length - rectOS2->yBottom; 88 rectWin32->top = length - rectOS2->yTop; 89 rectWin32->left = rectOS2->xLeft; 90 rectWin32->right = rectOS2->xRight; 91 57 92 return TRUE; 58 93 } … … 134 169 //****************************************************************************** 135 170 //****************************************************************************** 171 BOOL OSLibWinInvalidateRect(HWND hwnd, PRECT pRect, BOOL fIncludeChildren) 172 { 173 RECTLOS2 rectl; 174 175 MapWin32ToOS2Rectl(pRect, &rectl); 176 return WinInvalidateRect(hwnd, (PRECTL)&rectl, fIncludeChildren); 177 } 178 //****************************************************************************** 179 //Returns rectangle in Win32 window coordinates 180 //****************************************************************************** 181 BOOL OSLibWinQueryUpdateRect(HWND hwnd, PRECT pRect) 182 { 183 BOOL rc; 184 RECTLOS2 rectl; 185 186 rc = WinQueryUpdateRect(hwnd, (PRECTL)&rectl); 187 if(rc) { 188 MapOS2ToWin32Rectl(&rectl, pRect); 189 } 190 else memset(pRect, 0, sizeof(RECT)); 191 return rc; 192 } 193 //****************************************************************************** 194 //****************************************************************************** 195
Note:
See TracChangeset
for help on using the changeset viewer.