Changeset 715 for trunk/src/user32/new/oslibwin.cpp
- Timestamp:
- Aug 27, 1999, 7:50:57 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/oslibwin.cpp
r693 r715 1 /* $Id: oslibwin.cpp,v 1.2 4 1999-08-25 15:08:50dengert Exp $ */1 /* $Id: oslibwin.cpp,v 1.25 1999-08-27 17:50:56 dengert Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 64 64 dwFrameStyle |= FCF_TITLEBAR; 65 65 66 dwFrameStyle |= FCF_TASKLIST ;66 dwFrameStyle |= FCF_TASKLIST | FCF_NOMOVEWITHOWNER | FCF_NOBYTEALIGN; 67 67 *hwndFrame = WinCreateStdWindow(hwndParent, dwWinStyle, 68 68 &dwFrameStyle, WIN32_STDCLASS, … … 403 403 //****************************************************************************** 404 404 //****************************************************************************** 405 void OSLibMapSWPtoWINDOWPOS(PSWP pswp, PWINDOWPOS pwpos, PSWP pswpOld, ULONG parentHeight)405 void OSLibMapSWPtoWINDOWPOS(PSWP pswp, PWINDOWPOS pwpos, PSWP pswpOld, HWND hParent, HWND hFrame) 406 406 { 407 407 HWND hWindow = pswp->hwnd; … … 412 412 long cy = pswp->cy; 413 413 UINT fuFlags = (UINT)pswp->fl; 414 ULONG parentHeight; 414 415 415 416 HWND hWinAfter; … … 457 458 if ( fuFlags & (SWP_MOVE | SWP_SIZE) ) 458 459 { 460 if (hParent == NULLHANDLE) 461 { 462 ULONG Offset; 463 POINTL pt = {0, 0}; 464 465 Offset = OSLibGetWindowHeight(hFrame) - cy; 466 parentHeight = ScreenHeight; 467 468 cx += 2 * x; 469 cy += Offset; 470 WinMapWindowPoints (hFrame, HWND_DESKTOP, &pt, 1); 471 x = pt.x; 472 y = pt.y; 473 474 pswpOld->cx += 2 * pswpOld->x; 475 pswpOld->cy += Offset; 476 pswpOld->x = pt.x; 477 pswpOld->y = pt.y; 478 } 479 else 480 { 481 parentHeight = OSLibGetWindowHeight(hParent); 482 } 483 459 484 if (fuFlags & SWP_SIZE) 460 485 { … … 485 510 // relative to top left of parent. 486 511 //******************************************************** 487 y = parentHeight - y - cy; 488 489 LONG oldY = parentHeight - pswpOld->y - pswpOld->cy; 512 y = parentHeight - y - cy; 513 LONG oldY = parentHeight - pswpOld->y - pswpOld->cy; 490 514 491 515 // Set the SWP_NOMOVE_W flag if the window has not moved in windows … … 498 522 flags |= SWP_NOSIZE_W; 499 523 } 524 525 if (hParent == NULLHANDLE) 526 { 527 pswpOld->x = x + pswp->x; 528 pswpOld->y = y + cy - pswp->y - pswp->cy; 529 } 530 else { 531 pswpOld->x = pswp->x; 532 pswpOld->y = parentHeight - pswp->y - cy; 533 } 534 pswpOld->cx = pswp->cx; 535 pswpOld->cy = pswp->cy; 536 537 dprintf(("window (%d,%d)(%d,%d) client (%d,%d)(%d,%d)", 538 x,y,cx,cy, pswpOld->x,pswpOld->y,pswpOld->cx,pswpOld->cy)); 500 539 501 540 // Fill in the WINDOWPOS structure with the now calculated PM values. … … 510 549 //****************************************************************************** 511 550 //****************************************************************************** 512 void OSLibMapWINDOWPOStoSWP(PWINDOWPOS pwpos, PSWP pswp, PSWP pswpOld, ULONG parentHeight)551 void OSLibMapWINDOWPOStoSWP(PWINDOWPOS pwpos, PSWP pswp, PSWP pswpOld, HWND hParent, HWND hFrame) 513 552 { 514 553 HWND hWnd = pwpos->hwnd; … … 519 558 long cy = pwpos->cy; 520 559 UINT fuFlags = pwpos->flags; 560 ULONG parentHeight; 521 561 522 562 HWND hWinAfter; … … 571 611 if ( flags & (SWP_MOVE | SWP_SIZE) ) 572 612 { 613 if (hParent == NULLHANDLE) 614 parentHeight = ScreenHeight; 615 else 616 parentHeight = OSLibGetWindowHeight(hParent); 617 573 618 //********************************************************** 574 619 // We'll need both a y and cy for the Y inversion code. … … 617 662 } 618 663 619 // Fill in the WINDOWPOSstructure with the now calculated PM values.664 // Fill in the SWP structure with the now calculated PM values. 620 665 pswp->fl = flags; 621 666 pswp->cy = cy;
Note:
See TracChangeset
for help on using the changeset viewer.