Changeset 324 for trunk/src/user32/new/oslibwin.cpp
- Timestamp:
- Jul 17, 1999, 8:30:52 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/oslibwin.cpp
r323 r324 1 /* $Id: oslibwin.cpp,v 1. 8 1999-07-17 15:23:38sandervl Exp $ */1 /* $Id: oslibwin.cpp,v 1.9 1999-07-17 18:30:51 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 42 42 HWND hwndClient; 43 43 RECTL rectl; 44 45 dprintf(("WinCreateWindow %x %x %x %s", hwndParent, dwWinStyle, dwFrameStyle, pszName)); 44 46 45 47 if(pszName && *pszName == 0) { … … 181 183 182 184 if(fl & SWP_MOVE) { 183 hwndParent = WinQueryWindow(hwnd, QW_PARENT); 184 if(WinQueryWindowRect(hwnd, &rectl)) { 185 y = OS2TOWIN32POINT(rectl.yTop - rectl.yBottom, y); 186 } 185 y = MapOS2ToWin32Y(hwnd, y); 187 186 } 188 187 return WinSetWindowPos(hwnd, hwndInsertBehind, x, y, cx, cy, fl); … … 297 296 //****************************************************************************** 298 297 //****************************************************************************** 299 298 inline ULONG OS2TOWIN32POINT(RECTL *parent, RECTL *child, ULONG y) 299 { 300 return (parent->yTop - parent->yBottom - (child->yTop - child->yBottom) - y - 1); 301 } 302 //****************************************************************************** 303 //****************************************************************************** 304 ULONG MapOS2ToWin32Y(HWND hwndChild) 305 { 306 HWND hwndParent; 307 RECTL rectParent = {0}, rectChild = {0}; 308 309 WinQueryWindowRect(hwndChild, &rectChild); 310 hwndParent = WinQueryWindow(hwndChild, QW_PARENT); 311 WinQueryWindowRect(hwndParent, &rectParent); 312 return OS2TOWIN32POINT(&rectParent, &rectChild, rectChild.yBottom); 313 } 314 //****************************************************************************** 315 //****************************************************************************** 316 ULONG MapOS2ToWin32Y(HWND hwndChild, ULONG y) 317 { 318 HWND hwndParent; 319 RECTL rectParent = {0}, rectChild = {0}; 320 321 WinQueryWindowRect(hwndChild, &rectChild); 322 hwndParent = WinQueryWindow(hwndChild, QW_PARENT); 323 WinQueryWindowRect(hwndParent, &rectParent); 324 return OS2TOWIN32POINT(&rectParent, &rectChild, y); 325 } 326 //****************************************************************************** 327 //****************************************************************************** 328 ULONG MapOS2ToWin32Y(PRECTL rectParent, PRECTL rectChild, ULONG y) 329 { 330 return OS2TOWIN32POINT(rectParent, rectChild, y); 331 } 332 //****************************************************************************** 333 //****************************************************************************** 334 ULONG MapOS2ToWin32Y(PRECTL rectParent, HWND hwndChild, ULONG y) 335 { 336 RECTL rectChild = {0}; 337 338 WinQueryWindowRect(hwndChild, &rectChild); 339 return OS2TOWIN32POINT(rectParent, &rectChild, y); 340 } 341 //****************************************************************************** 342 //****************************************************************************** 343 ULONG MapOS2ToWin32Y(HWND hwndChild, PRECTL rectChild, ULONG y) 344 { 345 HWND hwndParent; 346 RECTL rectParent = {0}; 347 348 hwndParent = WinQueryWindow(hwndChild, QW_PARENT); 349 WinQueryWindowRect(hwndParent, &rectParent); 350 return OS2TOWIN32POINT(&rectParent, rectChild, y); 351 } 352 //****************************************************************************** 353 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.