Changeset 2421 for trunk/src/user32/new/pmframe.cpp
- Timestamp:
- Jan 12, 2000, 6:37:29 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/pmframe.cpp
r2418 r2421 1 /* $Id: pmframe.cpp,v 1.1 2 2000-01-12 15:14:16 sandervlExp $ */1 /* $Id: pmframe.cpp,v 1.13 2000-01-12 17:37:29 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Frame Managment Code for OS/2 … … 107 107 { 108 108 case WM_FORMATFRAME: 109 109 break; 110 110 111 111 case WM_MINMAXFRAME: … … 118 118 { 119 119 win32wnd->setStyle((win32wnd->getStyle() & ~WS_MINIMIZE_W) | WS_MAXIMIZE_W); 120 } 120 } 121 121 else if ((swp->fl & SWP_MINIMIZE) == SWP_MINIMIZE) 122 122 { 123 123 win32wnd->setStyle((win32wnd->getStyle() & ~WS_MAXIMIZE_W) | WS_MINIMIZE_W); 124 } 124 } 125 125 else if ((swp->fl & SWP_RESTORE) == SWP_RESTORE) 126 126 { … … 262 262 263 263 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) 264 265 266 267 268 269 270 271 272 273 274 264 { 265 swpClient.hwnd = win32wnd->getOS2WindowHandle(); 266 swpClient.hwndInsertBehind = 0; 267 swpClient.x = 0; 268 swpClient.y = 0; 269 swpClient.cx = 0; 270 swpClient.cy = 0; 271 swpClient.fl = pswp->fl & ~SWP_ZORDER; 272 WinSetMultWindowPos(thdb->hab, &swpClient, 1); 273 goto PosChangedEnd; 274 } 275 275 276 276 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) { … … 285 285 286 286 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) { 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 287 win32wnd->setWindowRect(wp.x, wp.y, wp.x+wp.cx, wp.y+wp.cy); 288 289 win32wnd->MsgFormatFrame(); 290 //CB: todo: use result for WM_CALCVALIDRECTS 291 mapWin32ToOS2Rect(WinQueryWindow(hwnd,QW_PARENT),hwnd,win32wnd->getClientRectPtr(),(PRECTLOS2)&rect); 292 293 swpClient.hwnd = win32wnd->getOS2WindowHandle(); 294 swpClient.hwndInsertBehind = 0; 295 swpClient.x = rect.xLeft; 296 swpClient.y = rect.yBottom; 297 swpClient.cx = rect.xRight-rect.xLeft; 298 swpClient.cy = rect.yTop-rect.yBottom; 299 //TODO: Get rid of SWP_SHOW; needed for winhlp32 button bar for now 300 swpClient.fl = (pswp->fl & ~SWP_ZORDER) | SWP_MOVE | SWP_SHOW; 301 WinSetMultWindowPos(thdb->hab, &swpClient, 1); 302 } 303 303 304 304 if(win32wnd->CanReceiveSizeMsgs()) … … 307 307 //update child positions: rectWindow is in window coordinates 308 308 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) { 309 310 309 FrameUpdateChildPositions(win32wnd->getOS2WindowHandle()); 310 } 311 311 312 312 PosChangedEnd: … … 317 317 case WM_CALCVALIDRECTS: 318 318 { 319 PRECTL oldRect = (PRECTL)mp1,newRect = oldRect+1;320 UINT res = 0; //= CVR_ALIGNLEFT | CVR_ALIGNTOP;321 322 //CB: todo: use WM_NCCALCSIZE result323 if (win32wnd->getWindowClass())324 {325 DWORD dwStyle = win32wnd->getWindowClass()->getClassLongA(GCL_STYLE_W);326 327 if ((dwStyle & CS_HREDRAW_W) && (newRect->xRight-newRect->xLeft != oldRect->xRight-oldRect->xLeft))328 res |= CVR_REDRAW;329 else if ((dwStyle & CS_VREDRAW_W) && (newRect->yTop-newRect->yBottom != oldRect->yTop-oldRect->yBottom))330 res |= CVR_REDRAW;331 } else res |= CVR_REDRAW;332 333 //CB: PM sets client window position334 // RestoreOS2TIB();335 // OldFrameProc(hwnd,msg,mp1,mp2);336 // SetWin32TIB();337 338 319 RestoreOS2TIB(); 339 return (MRESULT) res;320 return (MRESULT)CVR_REDRAW; //always redraw frame 340 321 } 341 322 … … 357 338 if (topOwner) WinSetWindowPos(topOwner->getOS2FrameWindowHandle(),hwnd,0,0,0,0,SWP_ZORDER); 358 339 } 359 } 340 } 360 341 else 361 342 { … … 404 385 SWP swpClient = {0}; 405 386 406 407 408 409 410 411 412 413 414 415 416 417 387 win32wnd->MsgFormatFrame(); 388 //CB: todo: use result for WM_CALCVALIDRECTS 389 mapWin32ToOS2Rect(WinQueryWindow(win32wnd->getOS2FrameWindowHandle(),QW_PARENT),win32wnd->getOS2FrameWindowHandle(),win32wnd->getClientRectPtr(),(PRECTLOS2)&rect); 390 391 swpClient.hwnd = win32wnd->getOS2WindowHandle(); 392 swpClient.hwndInsertBehind = 0; 393 swpClient.x = rect.xLeft; 394 swpClient.y = rect.yBottom; 395 swpClient.cx = rect.xRight-rect.xLeft; 396 swpClient.cy = rect.yTop-rect.yBottom; 397 swpClient.fl = SWP_MOVE | SWP_SIZE; 398 WinSetMultWindowPos(GetThreadHAB(), &swpClient, 1); 418 399 } 419 400 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.