- Timestamp:
- Sep 21, 1999, 7:05:36 PM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/Makefile
r996 r1000 1 # $Id: Makefile,v 1. 19 1999-09-21 08:24:04 sandervlExp $1 # $Id: Makefile,v 1.20 1999-09-21 17:05:36 dengert Exp $ 2 2 3 3 # … … 103 103 win32wndhandle.obj: win32wndhandle.cpp win32wndhandle.h 104 104 105 pmwindow.obj: pmwindow.cpp win32class.h win32wbase.h win32dlg.h pmwindow.h win32wndchild.h $(PDWIN32_INCLUDE)\wprocess.h oslibgdi.h oslibwin.h 105 pmwindow.obj: pmwindow.cpp win32class.h win32wbase.h win32dlg.h pmwindow.h win32wndchild.h $(PDWIN32_INCLUDE)\wprocess.h oslibgdi.h oslibwin.h dc.h 106 106 win32class.obj: win32class.cpp win32class.h win32wbase.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h 107 107 win32wbase.obj: win32wbase.cpp win32class.h win32wbase.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h $(PDWIN32_INCLUDE)\winres.h oslibres.h win32wndhandle.h oslibdos.h dc.h -
trunk/src/user32/dc.cpp
r962 r1000 1 /* $Id: dc.cpp,v 1. 2 1999-09-16 18:00:43dengert Exp $ */1 /* $Id: dc.cpp,v 1.3 1999-09-21 17:03:29 dengert Exp $ */ 2 2 3 3 /* … … 739 739 pHps->hdcType = TYPE_3; 740 740 lpps->hdc = (HDC)hps; 741 lpps->fErase = !wnd->MsgEraseBackGround(lpps->hdc); 741 742 if (wnd->isEraseBkgnd()) 743 wnd->setEraseBkgnd (FALSE, !wnd->MsgEraseBackGround(lpps->hdc)); 744 wnd->setSupressErase (FALSE); 745 lpps->fErase = wnd->isPSErase(); 742 746 743 747 if (!hPS_ownDC) … … 1119 1123 if (redraw & RDW_UPDATENOW_W) redraw &= ~RDW_ERASENOW_W; 1120 1124 1125 if (redraw & RDW_NOERASE_W) 1126 wnd->setEraseBkgnd (FALSE); 1127 1128 if (redraw & RDW_UPDATENOW_W) 1129 wnd->setSupressErase (FALSE); 1130 else if (redraw & RDW_ERASENOW_W) 1131 wnd->setSupressErase (FALSE); 1121 1132 #if 0 1122 if (redraw & RDW_NOERASE_W)1123 setEraseBkgnd (FALSE);1124 1125 if (redraw & RDW_UPDATENOW_W)1126 setSupressErase (TRUE, FALSE);1127 else if (redraw & RDW_ERASENOW_W)1128 setSupressErase (FALSE, FALSE);1129 1133 else 1130 1134 { 1131 1135 QMSG qmsg; 1132 BOOL bErase;1133 1134 bErase = (WinPeekMsg (HABX, &qmsg, hwnd, WM_PAINT, WM_PAINT, PM_REMOVE)1136 BOOL erase; 1137 1138 erase = (WinPeekMsg (HABX, &qmsg, hwnd, WM_PAINT, WM_PAINT, PM_REMOVE) 1135 1139 && (redraw & RDW_NOERASE_W) == 0); 1136 1140 1137 setSupressErase (FALSE, !bErase);1141 wnd->setSupressErase (!erase); 1138 1142 } 1139 1143 … … 1186 1190 if (redraw & RDW_INVALIDATE_W) 1187 1191 { 1188 //if (redraw & RDW_ERASE_W)1189 //setEraseBkgnd (TRUE, TRUE);1192 if (redraw & RDW_ERASE_W) 1193 wnd->setEraseBkgnd (TRUE, TRUE); 1190 1194 1191 1195 if (!pRect && !hrgn) … … 1216 1220 wnd->MsgPaint (0, FALSE); 1217 1221 1218 //else if ((redraw & RDW_ERASE_W) && (redraw & RDW_ERASENOW_W))1219 //setEraseBkgnd (FALSE, !sendEraseBkgnd (wnd));1222 else if ((redraw & RDW_ERASE_W) && (redraw & RDW_ERASENOW_W)) 1223 wnd->setEraseBkgnd (FALSE, !sendEraseBkgnd (wnd)); 1220 1224 } 1221 1225 else if ((redraw & RDW_INTERNALPAINT_W) && !(redraw & RDW_INVALIDATE_W)) … … 1235 1239 WinReleasePS (hpsTemp); 1236 1240 1237 //if ((redraw & RDW_INVALIDATE_W) == 0)1238 // setSupressErase (FALSE,FALSE);1239 //else if ((redraw & RDW_ERASENOW_W) == RDW_ERASENOW_W)1240 // setSupressErase (FALSE,TRUE);1241 if ((redraw & RDW_INVALIDATE_W) == 0) 1242 wnd->setSupressErase (FALSE); 1243 else if ((redraw & RDW_ERASENOW_W) == RDW_ERASENOW_W) 1244 wnd->setSupressErase (TRUE); 1241 1245 1242 1246 // if (!success) -
trunk/src/user32/dc.h
r949 r1000 1 /* $Id: dc.h,v 1. 1 1999-09-15 23:18:49 sandervlExp $ */1 /* $Id: dc.h,v 1.2 1999-09-21 17:03:29 dengert Exp $ */ 2 2 /* 3 3 * public dc functions … … 13 13 #define __DC_H__ 14 14 15 extern HDC sendEraseBkgnd (Win32BaseWindow *wnd); 15 16 extern void releaseOwnDC (HDC hps); 16 17 -
trunk/src/user32/oslibwin.cpp
r963 r1000 1 /* $Id: oslibwin.cpp,v 1. 2 1999-09-17 18:49:53dengert Exp $ */1 /* $Id: oslibwin.cpp,v 1.3 1999-09-21 17:04:26 dengert Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 157 157 //****************************************************************************** 158 158 //****************************************************************************** 159 ULONG OSLibSendMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam) 160 { 161 return (ULONG)WinSendMsg(hwnd, msg, (MPARAM)wParam, (MPARAM)lParam); 162 } 163 //****************************************************************************** 164 //****************************************************************************** 159 165 //****************************************************************************** 160 166 //****************************************************************************** … … 423 429 ULONG flags = 0; 424 430 425 //***************************************************426 // Map constant HWNDs (e.g. HWND_DESKTOP, HWND_TOP)427 //***************************************************428 431 HWND hWnd = (hWindow == HWND_DESKTOP) ? HWND_DESKTOP_W: hWindow; 429 432 430 if ( hWndInsertAfter == HWND_TOP)433 if (hWndInsertAfter == HWND_TOP) 431 434 hWinAfter = HWND_TOP_W; 432 else if ( hWndInsertAfter == HWND_BOTTOM)435 else if (hWndInsertAfter == HWND_BOTTOM) 433 436 hWinAfter = HWND_BOTTOM_W; 434 437 else … … 446 449 if ( fuFlags & SWP_HIDE) flags |= SWP_HIDEWINDOW_W; 447 450 448 //************************************************************************** 449 // When moving or sizing we'll have to do some calculations for Y inversion. 450 // 451 // If moving - invert Y coord. 452 // 453 // If sizing - if the height is changing, have to move the window to 454 // maintain correct windows position. If we just size then the 455 // TR corner will extend. The Windows behaviour should be to 456 // extend the BR corner. 457 // 458 // If this is a child window then we'll have to move within the client 459 // area of the parent. 460 // 461 // If this is an overlapped or popup window we'll have to move around 462 // within the desktop. 463 //************************************************************************** 464 if ( fuFlags & (SWP_MOVE | SWP_SIZE) ) 451 if (fuFlags & (SWP_MOVE | SWP_SIZE)) 465 452 { 466 453 if (hParent == NULLHANDLE) … … 490 477 if (fuFlags & SWP_SIZE) 491 478 { 492 // If height is changing we MUST move to maintain top-left alignment493 479 if (cy != pswpOld->cy) 494 480 { … … 502 488 } 503 489 504 //**********************************************************505 // We'll need both a y and cy for the Y inversion code.506 // If either wasn't passed in, calculate the current value.507 //**********************************************************508 490 if ((fuFlags & SWP_MOVE) == 0) 509 491 { … … 512 494 } 513 495 514 //******************************************************** 515 // Y inversion here... old Y is top left corner of window 516 // relative to top left of parent. 517 //******************************************************** 518 y = parentHeight - y - cy; 519 LONG oldY = parentHeight - pswpOld->y - pswpOld->cy; 520 521 // Set the SWP_NOMOVE_W flag if the window has not moved in windows 522 // coordinates. 523 if ( ( pswpOld->x == x ) && ( oldY == y ) ) 496 y = parentHeight - y - cy; 497 LONG oldY = parentHeight - pswpOld->y - pswpOld->cy; 498 499 if ((pswpOld->x == x) && (oldY == y)) 524 500 flags |= SWP_NOMOVE_W; 525 501 526 // Set the SWP_NOSIZE_W flag if the window is not really being sized. 527 if ( ( pswpOld->cx == cx ) && ( pswpOld->cy == cy ) ) 502 if ((pswpOld->cx == cx) && (pswpOld->cy == cy)) 528 503 flags |= SWP_NOSIZE_W; 529 504 } … … 544 519 x,y,cx,cy, pswpOld->x,pswpOld->y,pswpOld->cx,pswpOld->cy)); 545 520 546 // Fill in the WINDOWPOS structure with the now calculated PM values.547 521 pwpos->flags = (UINT)flags; 548 522 pwpos->cy = (int)cy; … … 557 531 void OSLibMapWINDOWPOStoSWP(PWINDOWPOS pwpos, PSWP pswp, PSWP pswpOld, HWND hParent, HWND hFrame) 558 532 { 559 HWND hWnd 560 HWND hWndInsertAfter 561 long x 562 long y 563 long cx 564 long cy 565 UINT fuFlags 533 HWND hWnd = pwpos->hwnd; 534 HWND hWndInsertAfter = pwpos->hwndInsertAfter; 535 long x = pwpos->x; 536 long y = pwpos->y; 537 long cx = pwpos->cx; 538 long cy = pwpos->cy; 539 UINT fuFlags = pwpos->flags; 566 540 ULONG parentHeight; 567 541 568 542 HWND hWinAfter; 569 543 ULONG flags = 0; 570 571 //***************************************************572 // Map constant HWNDs (e.g. HWND_DESKTOP, HWND_TOP)573 //***************************************************574 544 HWND hWindow = hWnd ? (HWND)hWnd : HWND_DESKTOP; 575 545 576 if ( hWndInsertAfter == HWND_TOPMOST_W)546 if (hWndInsertAfter == HWND_TOPMOST_W) 577 547 // hWinAfter = HWND_TOPMOST; 578 548 hWinAfter = HWND_TOP; 579 else if ( hWndInsertAfter == HWND_NOTOPMOST_W)549 else if (hWndInsertAfter == HWND_NOTOPMOST_W) 580 550 // hWinAfter = HWND_NOTOPMOST; 581 551 hWinAfter = HWND_TOP; 582 else if ( hWndInsertAfter == HWND_TOP_W)552 else if (hWndInsertAfter == HWND_TOP_W) 583 553 hWinAfter = HWND_TOP; 584 else if ( hWndInsertAfter == HWND_BOTTOM_W)554 else if (hWndInsertAfter == HWND_BOTTOM_W) 585 555 hWinAfter = HWND_BOTTOM; 586 556 else 587 557 hWinAfter = (HWND) hWndInsertAfter; 588 558 589 //*********************************** 590 // convert Windows flags to PM flags 591 //*********************************** 592 if ( ! ( fuFlags & SWP_NOSIZE_W ) ) flags |= SWP_SIZE; 593 if ( ! ( fuFlags & SWP_NOMOVE_W ) ) flags |= SWP_MOVE; 594 if ( ! ( fuFlags & SWP_NOZORDER_W ) ) flags |= SWP_ZORDER; 595 if ( fuFlags & SWP_NOREDRAW_W ) flags |= SWP_NOREDRAW; 596 if ( ! ( fuFlags & SWP_NOACTIVATE_W ) ) flags |= SWP_ACTIVATE; 597 if ( fuFlags & SWP_SHOWWINDOW_W ) flags |= SWP_SHOW; 598 if ( fuFlags & SWP_HIDEWINDOW_W ) flags |= SWP_HIDE; 599 /* no PM equivalent for SWP_FRAMECHANGED_W, SWP_NOCOPYBITS_W and SWP_NOOWNERZORDER_W */ 600 601 //************************************************************************** 602 // When moving or sizing we'll have to do some calculations for Y inversion. 603 // 604 // If moving - invert Y coord. 605 // 606 // If sizing - if the height is changing, have to move the window to 607 // maintain correct windows position. If we just size then the 608 // TR corner will extend. The Windows behaviour should be to 609 // extend the BR corner. 610 // 611 // If this is a child window then we'll have to move within the client 612 // area of the parent. 613 // 614 // If this is an overlapped or popup window we'll have to move around 615 // within the desktop. 616 //************************************************************************** 617 if ( flags & (SWP_MOVE | SWP_SIZE) ) 559 if (!(fuFlags & SWP_NOSIZE_W )) flags |= SWP_SIZE; 560 if (!(fuFlags & SWP_NOMOVE_W )) flags |= SWP_MOVE; 561 if (!(fuFlags & SWP_NOZORDER_W )) flags |= SWP_ZORDER; 562 if ( fuFlags & SWP_NOREDRAW_W ) flags |= SWP_NOREDRAW; 563 if (!(fuFlags & SWP_NOACTIVATE_W)) flags |= SWP_ACTIVATE; 564 if ( fuFlags & SWP_SHOWWINDOW_W) flags |= SWP_SHOW; 565 if ( fuFlags & SWP_HIDEWINDOW_W) flags |= SWP_HIDE; 566 567 if (flags & (SWP_MOVE | SWP_SIZE)) 618 568 { 619 569 if (hParent == NULLHANDLE) … … 622 572 parentHeight = OSLibGetWindowHeight(hParent); 623 573 624 //**********************************************************625 // We'll need both a y and cy for the Y inversion code.626 // If either wasn't passed in, calculate the current value.627 //**********************************************************628 574 if ((flags & SWP_MOVE) == 0) 629 575 { … … 631 577 y = pswpOld->y; 632 578 633 // If the window is at (x,0) with a height of zero then this calculation 634 // won't quite work. Instead of calculating the Windows y coord, we set 635 // it at (x,0). 636 if (!(y == 0 && pswpOld->cy == 0)) 579 if (!((y == 0) && (pswpOld->cy == 0))) 637 580 { 638 // convert Y coordinate back to Windows's for later conversion with new size639 581 y = parentHeight - y - pswpOld->cy; 640 582 } … … 643 585 if (flags & SWP_SIZE) 644 586 { 645 // If height is changing we MUST move to maintain top-left alignment646 587 if (cy != pswpOld->cy) 647 588 flags |= SWP_MOVE; … … 653 594 } 654 595 655 //********************************************************656 // Y inversion here... old Y is top left corner of window657 // relative to top left of parent.658 //********************************************************659 596 y = parentHeight - y - cy; 660 597 661 // Clear the SWP_MOVE flag if the window is not really being moved. 662 if ( ( pswpOld->x == x ) && ( pswpOld->y == y ) ) 598 if ((pswpOld->x == x) && (pswpOld->y == y)) 663 599 flags &= ~SWP_MOVE; 664 600 665 // Clear the SWP_SIZE flag if the window is not really being sized. 666 if ( ( pswpOld->cx == cx ) && ( pswpOld->cy == cy ) ) 601 if ((pswpOld->cx == cx) && (pswpOld->cy == cy)) 667 602 flags &= ~SWP_SIZE; 668 603 } 669 604 670 // Fill in the SWP structure with the now calculated PM values.671 605 pswp->fl = flags; 672 606 pswp->cy = cy; -
trunk/src/user32/oslibwin.h
r963 r1000 1 /* $Id: oslibwin.h,v 1. 2 1999-09-17 18:49:53dengert Exp $ */1 /* $Id: oslibwin.h,v 1.3 1999-09-21 17:04:27 dengert Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 45 45 46 46 BOOL OSLibPostMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam); 47 ULONG OSLibSendMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam); 47 48 48 49 #define WAOS_WARNING 0 -
trunk/src/user32/pmwindow.cpp
r996 r1000 1 /* $Id: pmwindow.cpp,v 1. 3 1999-09-21 08:24:04 sandervlExp $ */1 /* $Id: pmwindow.cpp,v 1.4 1999-09-21 17:05:36 dengert Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 27 27 #include "oslibgdi.h" 28 28 #include "oslibmsg.h" 29 #include "dc.h" 29 30 30 31 HMQ hmq = 0; /* Message queue handle */ … … 222 223 } 223 224 classStyle = win32wnd->getClass()->getStyle(); 224 // if (yDelta != 0)225 225 if ((yDelta != 0) && ((classStyle & CS_VREDRAW_W) || 226 226 ((classStyle & CS_HREDRAW_W) && (pswp->cx != pswpo->cx)))) … … 231 231 HWND hwnd; 232 232 233 dprintf(("move children"));234 233 while ((hwnd = WinGetNextWindow(henum)) != NULLHANDLE) 235 234 { 236 235 #if 0 237 /* Do not move MDI clients. MDI clients are a special case, 238 * even though they are bottom aligned they are always supposed 239 * to be the same size as their parent. This code is an 240 * optimization and will not work correctly if the this 241 * assumption is incorrect. 242 */ 243 WinBase *pBase = (WinBase *)WinQueryDAXData( hwnd ); 244 if ( pBase && pBase->typeOf() == mdiClient ) 236 if (mdiClient ) 245 237 { 246 238 continue; 247 239 } 248 240 #endif 249 // We don't know how many children we have so we'll move ten250 // at a time. Not very nice, I know.251 241 WinQueryWindowPos(hwnd, &(swp[i])); 252 253 // The SWP flags are all set but PM will ignore any254 // superflous ones, so keep them as they contain useful255 // minimise and maximise flags.256 242 swp[i].y += yDelta; 257 243 … … 269 255 WinEndEnumWindows(henum); 270 256 271 // Any remaining windows?272 257 if (i) 273 258 WinSetMultWindowPos(GetThreadHAB(), swp, i); … … 280 265 case WM_ERASEBACKGROUND: 281 266 { 282 if(win32wnd->MsgEraseBackGround(0)) { 283 goto RunDefWndProc; 267 if (!win32wnd->isSupressErase()) { 268 BOOL erased = sendEraseBkgnd (win32wnd); 269 win32wnd->setEraseBkgnd (!erased, !erased); 284 270 } 285 271 break; … … 558 544 559 545 case WM_TIMER: 560 546 win32wnd->MsgTimer((ULONG)mp1); 561 547 goto RunDefWndProc; 562 548 … … 592 578 case WM_PAINT: 593 579 dprintf(("OS2: WM_PAINT %x", hwnd)); 580 581 if (WinQueryUpdateRect (hwnd, NULL)) { 582 if (!win32wnd->isSupressErase()) { 583 BOOL erased = sendEraseBkgnd (win32wnd); 584 win32wnd->setEraseBkgnd (!erased, !erased); 585 } 586 } 587 win32wnd->setSupressErase (FALSE); 588 594 589 if(win32wnd->MsgPaint(0, 0)) { 595 590 goto RunDefWndProc; -
trunk/src/user32/user32.cpp
r984 r1000 1 /* $Id: user32.cpp,v 1.2 7 1999-09-19 13:27:48 cbratschiExp $ */1 /* $Id: user32.cpp,v 1.28 1999-09-21 17:04:27 dengert Exp $ */ 2 2 3 3 /* … … 8 8 * Copyright 1998 Peter Fitzsimmons 9 9 * Copyright 1999 Christoph Bratschi 10 * Copyright 1999 Daniela Engert (dani@ngrt.de) 10 11 * 11 12 * -
trunk/src/user32/win32class.h
r949 r1000 1 /* $Id: win32class.h,v 1. 1 1999-09-15 23:19:00 sandervlExp $ */1 /* $Id: win32class.h,v 1.2 1999-09-21 17:04:27 dengert Exp $ */ 2 2 /* 3 3 * Win32 Window Class Managment Code for OS/2 … … 5 5 * 6 6 * Copyright 1998-1999 Sander van Leeuwen (sandervl@xs4all.nl) 7 * Copyright 1999 Daniela Engert (dani@ngrt.de) 7 8 * 8 9 */ -
trunk/src/user32/win32wbase.cpp
r996 r1000 1 /* $Id: win32wbase.cpp,v 1. 5 1999-09-21 08:24:05 sandervlExp $ */1 /* $Id: win32wbase.cpp,v 1.6 1999-09-21 17:05:36 dengert Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 116 116 menuResource = NULL; 117 117 iconResource = NULL; 118 119 EraseBkgndFlag = TRUE; 120 PSEraseFlag = FALSE; 121 SupressEraseFlag = FALSE; 118 122 } 119 123 //****************************************************************************** … … 1027 1031 1028 1032 if (hdcErase == 0) 1029 hdcErase = GetDC(Win32Hwnd);1033 hdcErase = O32_GetDC(OS2Hwnd); 1030 1034 1031 1035 if(isIcon) … … 1034 1038 rc = SendInternalMessageA(WM_ERASEBKGND, hdcErase, 0); 1035 1039 if (hdc == 0) 1036 ReleaseDC(Win32Hwnd, hdcErase);1040 O32_ReleaseDC(OS2Hwnd, hdcErase); 1037 1041 return (rc); 1038 1042 } … … 1180 1184 if (!windowClass->getBackgroundBrush()) return 0; 1181 1185 1182 /* Since WM_ERASEBKGND may receive either a window dc or a */1183 /* client dc, the area to be erased has to be retrieved from */1184 /* the device context. */1185 1186 rc = GetClipBox( (HDC)wParam, &rect ); 1186 1187 if ((rc == SIMPLEREGION) || (rc == COMPLEXREGION)) … … 1554 1555 dprintf (("SetWindowPos %x %x (%d,%d)(%d,%d) %x", Win32Hwnd, hwndInsertAfter, x, y, cx, cy, fuFlags)); 1555 1556 1556 /* Validate the flags passed in ... */ 1557 if ( fuFlags & 1558 ~(SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | 1559 SWP_NOREDRAW | SWP_NOACTIVATE | SWP_FRAMECHANGED | 1560 SWP_SHOWWINDOW | SWP_HIDEWINDOW | SWP_NOCOPYBITS | 1561 SWP_NOOWNERZORDER) ) 1557 if (fuFlags & 1558 ~(SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | 1559 SWP_NOREDRAW | SWP_NOACTIVATE | SWP_FRAMECHANGED | 1560 SWP_SHOWWINDOW | SWP_HIDEWINDOW | SWP_NOCOPYBITS | 1561 SWP_NOOWNERZORDER)) 1562 1562 { 1563 1563 return FALSE; … … 1567 1567 SWP swp, swpOld; 1568 1568 1569 //****************************1570 // Set up with Windows values.1571 //****************************1572 1569 wpos.flags = fuFlags; 1573 1570 wpos.cy = cy; … … 1578 1575 wpos.hwnd = getWindowHandle(); 1579 1576 1580 //**********************************************1581 // Convert from Windows to PM coords and flags.1582 //**********************************************1583 1577 if(~fuFlags & (SWP_NOMOVE | SWP_NOSIZE)) { 1584 1578 if (isChild()) … … 1589 1583 OSLibWinQueryWindowPos(OS2HwndFrame, &swpOld); 1590 1584 } 1585 1591 1586 OSLibMapWINDOWPOStoSWP(&wpos, &swp, &swpOld, hParent, OS2HwndFrame); 1592 1593 /* MapSWP can clear the SWP_MOVE and SWP_SIZE flags if the window is not1594 * being moved or sized. If these were the only operations to be done1595 * and they have been cleared, return now.1596 */1597 1587 if (swp.fl == 0) 1598 1588 return TRUE; 1599 1600 //*********************************************************************1601 //On Windows, a WM_GETMINMAXINFO is made to the app from within this API.1602 //We'll send a WM_QUERYTRACKINFO which is translated into a WM_GETMINMAXINFO1603 //and passed on to the app. Compare the values returned with the SWP cx and1604 //cy values. They cannot be bigger than the max nor smaller than the min.1605 //*********************************************************************1606 1589 1607 1590 if ((swp.fl & SWPOS_ZORDER) && (swp.hwndInsertBehind > HWNDOS_BOTTOM)) … … 1625 1608 dprintf (("WinSetWindowPos %x %x (%d,%d)(%d,%d) %x", swp.hwnd, swp.hwndInsertBehind, swp.x, swp.y, swp.cx, swp.cy, swp.fl)); 1626 1609 1627 //*****************************************************************************1628 // Squibble the window. (WinSetMultWindowPos is faster than WinSetWindowPos.)1629 //*****************************************************************************1630 1610 rc = OSLibWinSetMultWindowPos(&swp, 1); 1631 1611 … … 1636 1616 else 1637 1617 { 1638 /* To implement support for SWP_FRAMECHANGED_W correctly, we would need 1639 ** to send a WM_NCCALCSIZE message. This means DAX would have to support 1640 ** the WM_NCCALCSIZE message. I don't think DAX can support this 1641 ** message because it is tightly bound with the architecture of 1642 ** overlapped windows (the "just one window" architecture). However, 1643 ** we *can* support the SWP_FRAMECHANGED flag by sending the window 1644 ** a WM_UPDATEFRAME, which will provide the behavior of WM_NCCALCSIZE. 1645 */ 1646 // if (fuFlags & SWP_FRAMECHANGED_W) 1647 // WinSendMsg(hWindow, WM_UPDATEFRAME, (MPARAM)-1, 0); 1618 if (fuFlags & SWP_FRAMECHANGED_W) 1619 OSLibSendMessage (OS2HwndFrame, 0x42 /*WM_UPDATEFRAME*/, -1, 0); 1648 1620 } 1649 1621 -
trunk/src/user32/win32wbase.h
r996 r1000 1 /* $Id: win32wbase.h,v 1. 2 1999-09-21 08:24:05 sandervlExp $ */1 /* $Id: win32wbase.h,v 1.3 1999-09-21 17:05:36 dengert Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 288 288 protected: 289 289 HDC ownDC; 290 291 ULONG EraseBkgndFlag:1, 292 PSEraseFlag:1, 293 SupressEraseFlag:1, 294 filler:29; 295 public: 296 VOID setEraseBkgnd (BOOL erase, BOOL PSErase = FALSE) 297 { EraseBkgndFlag = erase; PSEraseFlag = PSErase; } 298 VOID setSupressErase (BOOL erase = FALSE) 299 { SupressEraseFlag = erase; } 300 BOOL isEraseBkgnd() { return EraseBkgndFlag; } 301 BOOL isPSErase() { return EraseBkgndFlag | PSEraseFlag; } 302 BOOL isSupressErase() { return SupressEraseFlag; } 290 303 }; 291 304 -
trunk/src/user32/wingdi.cpp
r949 r1000 1 /* $Id: wingdi.cpp,v 1. 1 1999-09-15 23:19:03 sandervlExp $ */1 /* $Id: wingdi.cpp,v 1.2 1999-09-21 17:04:27 dengert Exp $ */ 2 2 /* 3 3 * Win32 Window graphics apis for OS/2 … … 5 5 * 6 6 * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl) 7 * Copyright 1999 Daniela Engert (dani@ngrt.de) 7 8 * 8 9 * … … 33 34 return 0; 34 35 } 35 // !! there is no HDC to paint on !!! 36 // !! there is no HDC to paint on !!! window->MsgEraseBackGround(hdc); 36 37 #ifdef OPEN32_GDI 37 38 hdc = O32_BeginPaint(window->getOS2WindowHandle(),lps); … … 118 119 window = Win32BaseWindow::GetWindowFromHandle(hwnd); 119 120 if(!window) { 120 121 121 dprintf(("GetWindowDC, window %x not found", hwnd)); 122 return 0; 122 123 } 123 124 dprintf(("GetWindowDC %x", hwnd));
Note:
See TracChangeset
for help on using the changeset viewer.