Changeset 2140 for trunk/src/user32/pmframe.cpp
- Timestamp:
- Dec 19, 1999, 6:46:26 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/pmframe.cpp
r2114 r2140 1 /* $Id: pmframe.cpp,v 1.2 7 1999-12-18 16:31:49cbratschi Exp $ */1 /* $Id: pmframe.cpp,v 1.28 1999-12-19 17:46:24 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Frame Managment Code for OS/2 … … 26 26 27 27 #define PMFRAMELOG 28 29 #define GCL_STYLE_W (-26) 30 #define CS_VREDRAW_W 0x0001 31 #define CS_HREDRAW_W 0x0002 28 32 29 33 //****************************************************************************** … … 333 337 SetWin32TIB(); 334 338 339 if (win32wnd->getParent() && win32wnd->getParent()->InMovingChildren()) 340 goto PosChangedEnd; //same Win32 pos, only OS/2 pos changed 341 335 342 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) 336 343 goto PosChangedEnd; … … 352 359 win32wnd->setClientRect(swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy); 353 360 354 if(!win32wnd->CanReceiveSizeMsgs())355 goto PosChangedEnd;356 357 361 wp.hwnd = win32wnd->getWindowHandle(); 358 362 if ((pswp->fl & SWP_ZORDER) && (pswp->hwndInsertBehind > HWND_BOTTOM)) … … 362 366 } 363 367 368 #if 0 //CB: PM does it now for us (-> WM_CALVALIDRECTS) 369 // if you remove this code, delete *MovingChildren in Win32BaseWindow class 364 370 if (yDelta != 0 || xDelta != 0) 365 371 { 366 HENUM henum = WinBeginEnumWindows(WinWindowFromID( pswp->hwnd,FID_CLIENT));372 HENUM henum = WinBeginEnumWindows(WinWindowFromID(hwnd,FID_CLIENT)); 367 373 SWP swp[10]; 368 374 int i = 0; 369 375 HWND hwnd; 370 376 377 win32wnd->setMovingChildren(TRUE); 371 378 while ((hwnd = WinGetNextWindow(henum)) != NULLHANDLE) 372 379 { 373 #if 0374 if (mdiClient )375 {376 continue;377 }378 #endif379 380 WinQueryWindowPos(hwnd, &(swp[i])); 380 381 … … 385 386 #endif 386 387 387 if(swp[i].y != 0) //CB: y value of 0 is valid!388 //if(swp[i].y != 0) //CB: y value of 0 is valid! 388 389 { 389 390 //child window at offset <> 0 from client area -> offset now changes 390 391 swp[i].y += yDelta; 391 swp[i].fl &= ~(SWP_NOREDRAW);392 swp[i].fl = SWP_MOVE | SWP_NOADJUST; 392 393 } 393 394 //else child window with the same start coordinates as the client area … … 409 410 if (i) 410 411 WinSetMultWindowPos(GetThreadHAB(), swp, i); 412 win32wnd->setMovingChildren(FALSE); 411 413 } 412 414 if (yDelta != 0) … … 419 421 } 420 422 } 423 #endif 424 if(!win32wnd->CanReceiveSizeMsgs()) 425 goto PosChangedEnd; 426 421 427 win32wnd->MsgPosChanged((LPARAM)&wp); 422 428 … … 424 430 RestoreOS2TIB(); 425 431 return rc; 432 } 433 434 case WM_CALCVALIDRECTS: 435 { 436 PRECTL oldRect = (PRECTL)mp1,newRect = oldRect+1; 437 UINT res = CVR_ALIGNLEFT | CVR_ALIGNTOP; 438 439 //CB: only used if CS_SIZEDRAW isn't set 440 // PM moves children -> fast, no flickering (if redraw flags not set) 441 if (win32wnd->getWindowClass()) 442 { 443 DWORD dwStyle = win32wnd->getWindowClass()->getClassLongA(GCL_STYLE_W); 444 445 if (dwStyle & CS_HREDRAW_W && newRect->xRight-newRect->xLeft != oldRect->xRight-oldRect->xLeft) 446 res |= CVR_REDRAW; 447 else if (dwStyle & CS_VREDRAW_W && newRect->yTop-newRect->yBottom != oldRect->yTop-oldRect->yBottom) 448 res |= CVR_REDRAW; 449 } else res |= CVR_REDRAW; 450 451 //CB: PM updates window frame (and unfortunately all other frame controls) 452 RestoreOS2TIB(); 453 OldFrameProc(hwnd,msg,mp1,mp2); 454 SetWin32TIB(); 455 456 RestoreOS2TIB(); 457 return (MRESULT)res; 426 458 } 427 459
Note:
See TracChangeset
for help on using the changeset viewer.