- Timestamp:
- Dec 19, 1999, 6:46:26 PM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/button.cpp
r1944 r2140 1 /* $Id: button.cpp,v 1.2 1 1999-12-02 16:34:42cbratschi Exp $ */1 /* $Id: button.cpp,v 1.22 1999-12-19 17:46:24 cbratschi Exp $ */ 2 2 /* File: button.cpp -- Button type widgets 3 3 * … … 943 943 944 944 rtext.right -= checkBoxWidth + 4; 945 //CB: space for focus rect 946 rtext.left++; 947 rtext.right++; 945 948 rbox.left = rbox.right - checkBoxWidth; 946 949 } -
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 -
trunk/src/user32/pmwindow.cpp
r2084 r2140 1 /* $Id: pmwindow.cpp,v 1.6 5 1999-12-16 00:11:45 sandervlExp $ */1 /* $Id: pmwindow.cpp,v 1.66 1999-12-19 17:46:25 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 156 156 (PFNWP)Win32WindowProc, /* Address of window procedure */ 157 157 // CS_SIZEREDRAW | CS_HITTEST | CS_MOVENOTIFY, 158 CS_SIZEREDRAW | CS_HITTEST, 158 //CS_SIZEREDRAW | CS_HITTEST, 159 CS_HITTEST, 159 160 NROF_WIN32WNDBYTES)) { 160 161 dprintf(("WinRegisterClass Win32BaseWindow failed")); … … 376 377 } 377 378 378 379 PRECT lpRect = win32wnd->getWindowRect(); 379 380 //SvL: Only send it when the client has changed & the frame hasn't 380 381 // If the frame size/position has changed, pmframe.cpp will send 381 382 // this message 382 383 384 385 elsewin32wnd->setWindowRect(wp.x, wp.y, wp.x+wp.cx, wp.y+wp.cy);383 if(lpRect->right == wp.x+wp.cx && lpRect->bottom == wp.y+wp.cy) { 384 win32wnd->MsgPosChanged((LPARAM)&wp); 385 } 386 else win32wnd->setWindowRect(wp.x, wp.y, wp.x+wp.cx, wp.y+wp.cy); 386 387 387 388 goto RunDefWndProc; … … 419 420 { 420 421 dprintf(("OS2: WM_MINMAXFRAME")); 421 422 break; 422 423 } 423 424 case WM_OWNERPOSCHANGE: … … 784 785 785 786 case WM_INITMENU: 786 787 787 win32wnd->MsgInitMenu((HWND)mp2); 788 break; 788 789 789 790 case WM_MENUSELECT: -
trunk/src/user32/win32wbase.cpp
r2114 r2140 1 /* $Id: win32wbase.cpp,v 1.11 4 1999-12-18 16:31:50cbratschi Exp $ */1 /* $Id: win32wbase.cpp,v 1.115 1999-12-19 17:46:25 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 146 146 fInternalMsg = FALSE; 147 147 fNoSizeMsg = FALSE; 148 fMovingChildren = FALSE; 148 149 fIsDestroyed = FALSE; 149 150 fDestroyWindowCalled = FALSE; … … 855 856 ULONG Win32BaseWindow::MsgPosChanging(LPARAM lp) 856 857 { 857 if(fNoSizeMsg )858 if(fNoSizeMsg || (getParent() && getParent()->InMovingChildren())) 858 859 return 1; 859 860 … … 864 865 ULONG Win32BaseWindow::MsgPosChanged(LPARAM lp) 865 866 { 866 if(fNoSizeMsg )867 if(fNoSizeMsg || (getParent() && getParent()->InMovingChildren())) 867 868 return 1; 868 869 … … 874 875 { 875 876 dprintf(("MsgMove to (%d,%d)", x, y)); 876 if(fNoSizeMsg )877 if(fNoSizeMsg || (getParent() && getParent()->InMovingChildren())) 877 878 return 1; 878 879 -
trunk/src/user32/win32wbase.h
r2084 r2140 1 /* $Id: win32wbase.h,v 1.5 4 1999-12-16 00:11:47 sandervlExp $ */1 /* $Id: win32wbase.h,v 1.55 1999-12-19 17:46:26 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 47 47 ULONG wParam; 48 48 ULONG lParam; 49 49 ULONG fUnicode; 50 50 } POSTMSG_PACKET; 51 51 52 #define BROADCAST_SEND 53 #define BROADCAST_POST 52 #define BROADCAST_SEND 0 53 #define BROADCAST_POST 1 54 54 55 55 class Win32BaseWindow : public GenericObject, public ChildWindow … … 95 95 char *MsgGetText(); 96 96 ULONG MsgContextMenu(ULONG x,ULONG y); 97 97 void MsgInitMenu(HWND hMenu); 98 98 VOID updateWindowStyle(DWORD oldExStyle,DWORD oldStyle); 99 99 … … 119 119 virtual BOOL isMDIChild(); 120 120 121 121 BOOL fHasParentDC() { return fParentDC; }; 122 122 123 123 Win32BaseWindow *getParent(); … … 181 181 HWND getOS2HwndModalDialog() { return OS2HwndModalDialog; }; 182 182 BOOL CanReceiveSizeMsgs() { return !fNoSizeMsg; }; 183 BOOL InMovingChildren() { return fMovingChildren; }; 184 VOID setMovingChildren(BOOL fMC) { fMovingChildren = fMC; }; 183 185 BOOL IsWindowDestroyed() { return fIsDestroyed; }; 184 186 BOOL IsWindowEnabled(); 185 187 BOOL IsWindowVisible(); 186 187 // BOOL IsUnicode() 188 189 BOOL IsWindowUnicode(); 188 //Created with CreateWindowExA or ExW 189 // BOOL IsUnicode() { return isUnicode; }; 190 //Window procedure type 191 BOOL IsWindowUnicode(); 190 192 191 193 BOOL GetWindowRect(PRECT pRect); … … 232 234 233 235 BOOL EnumChildWindows(WNDENUMPROC lpfn, LPARAM lParam); 234 235 236 BOOL EnumThreadWindows(DWORD dwThreadId, WNDENUMPROC lpfn, LPARAM lParam); 237 BOOL EnumWindows(WNDENUMPROC lpfn, LPARAM lParam); 236 238 237 239 HWND getNextDlgTabItem(HWND hwndCtrl, BOOL fPrevious); … … 302 304 //sent by PM and those sent by apps 303 305 BOOL fNoSizeMsg; 306 BOOL fMovingChildren; 304 307 BOOL fIsDestroyed; 305 308 BOOL fDestroyWindowCalled; //DestroyWindow was called for this window 306 309 BOOL fCreated; 307 BOOL fTaskList;//should be listed in PM tasklist or not308 309 310 DWORD dwThreadId;//id of thread that created this window311 DWORD dwProcessId;//id of process that created this window310 BOOL fTaskList; //should be listed in PM tasklist or not 311 BOOL fParentDC; 312 313 DWORD dwThreadId; //id of thread that created this window 314 DWORD dwProcessId; //id of process that created this window 312 315 PVOID pOldFrameProc; 313 316 ULONG borderWidth;
Note:
See TracChangeset
for help on using the changeset viewer.