Changeset 1333 for trunk/src/user32/pmwindow.cpp
- Timestamp:
- Oct 17, 1999, 2:17:46 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/pmwindow.cpp
r1324 r1333 1 /* $Id: pmwindow.cpp,v 1.3 2 1999-10-16 18:56:51 sandervlExp $ */1 /* $Id: pmwindow.cpp,v 1.33 1999-10-17 12:17:44 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 257 257 258 258 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) break; 259 if (!win32wnd->CanReceiveSizeMsgs())break;259 if (!win32wnd->CanReceiveSizeMsgs()) break; 260 260 261 261 WinQueryWindowPos(hwnd, &swpOld); … … 263 263 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) { 264 264 if (win32wnd->isChild()) { 265 266 267 268 elsebreak;269 265 if(win32wnd->getParent()) { 266 hParent = win32wnd->getParent()->getOS2WindowHandle(); 267 } 268 else break; 269 } 270 270 else 271 271 hFrame = win32wnd->getOS2FrameWindowHandle(); … … 297 297 298 298 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) break; 299 if (!win32wnd->CanReceiveSizeMsgs())break;299 if (!win32wnd->CanReceiveSizeMsgs()) break; 300 300 301 301 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) { 302 302 if (win32wnd->isChild()) { 303 304 305 306 elsegoto RunDefWndProc; //parent has just been destroyed303 if(win32wnd->getParent()) { 304 hParent = win32wnd->getParent()->getOS2WindowHandle(); 305 } 306 else goto RunDefWndProc; //parent has just been destroyed 307 307 } 308 308 else … … 311 311 OSLibMapSWPtoWINDOWPOS(pswp, &wp, pswpo, hParent, hFrame); 312 312 313 313 SWP swpFrame; 314 314 WinQueryWindowPos(WinQueryWindow(hwnd, QW_PARENT), &swpFrame); 315 315 dprintf(("WINDOWPOSCHANGE %x %x %x (%d,%d) (%d,%d)", win32wnd->getWindowHandle(), win32wnd->getOS2FrameWindowHandle(), 316 316 swpFrame.fl,swpFrame.x, swpFrame.y, swpFrame.cx, swpFrame.cy)); 317 318 319 320 321 322 323 324 325 326 317 POINTL point; 318 319 point.x = swpFrame.x; 320 point.y = swpFrame.y; 321 if(win32wnd->getParent() != NULL) 322 { 323 WinMapWindowPoints(WinQueryWindow(hwnd, QW_PARENT), HWND_DESKTOP, 324 &point, 1); 325 } 326 point.y = OSLibQueryScreenHeight() - point.y - swpFrame.cy; 327 327 win32wnd->setWindowRect(point.x, point.y, point.x+swpFrame.cx, point.y+swpFrame.cy); 328 328 win32wnd->setClientRect(pswpo->x, pswpo->y, pswpo->x + pswpo->cx, pswpo->y + pswpo->cy); … … 614 614 //Slider messages 615 615 //************************************************************************** 616 /* CB: handled internally 616 617 case WM_VSCROLL: 617 618 case WM_HSCROLL: … … 630 631 break; 631 632 } 633 */ 632 634 633 635 case WM_CONTROL: … … 845 847 case WM_ERASEBACKGROUND: 846 848 { 847 849 dprintf(("OS2: WM_ERASEBACKGROUND %x", win32wnd->getWindowHandle())); 848 850 if (!win32wnd->isSupressErase()) { 849 851 BOOL erased = sendEraseBkgnd (win32wnd); … … 916 918 //****************************************************************************** 917 919 //****************************************************************************** 920 MRESULT EXPENTRY Win32SubclassWindowProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 921 { 922 Win32BaseWindow* win32wnd; 923 924 //Restore our FS selector 925 SetWin32TIB(); 926 927 win32wnd = Win32BaseWindow::GetWindowFromOS2Handle(hwnd); 928 929 if (!win32wnd) 930 { 931 dprintf(("Invalid win32wnd pointer for subclassed window %x!!", hwnd)); 932 goto RunDefWndProc; 933 } 934 935 switch (msg) 936 { 937 case WM_WINDOWPOSCHANGED: 938 { 939 PSWP pswp = (PSWP)mp1; 940 PSWP pswpo = pswp + 1; 941 WINDOWPOS wp; 942 HWND hParent = NULLHANDLE, hFrame = NULLHANDLE; 943 944 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) break; 945 946 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) 947 hFrame = WinQueryWindow(hwnd, QW_PARENT); 948 949 OSLibMapSWPtoWINDOWPOS(pswp,&wp,pswpo,hParent,hFrame); 950 win32wnd->MsgPosChanged((LPARAM)&wp); 951 952 goto RunOldWndProc; 953 } 954 955 default: 956 goto RunDefHandler; 957 } 958 959 RunDefWndProc: 960 RestoreOS2TIB(); 961 return WinDefWindowProc(hwnd,msg,mp1,mp2); 962 963 RunOldWndProc: 964 RestoreOS2TIB(); 965 return ((PFNWP)win32wnd->getOldWndProc())(hwnd,msg,mp1,mp2); 966 967 RunDefHandler: 968 RestoreOS2TIB(); 969 return Win32WindowProc(hwnd,msg,mp1,mp2); 970 } 971 972 PVOID SubclassWithDefHandler(HWND hwnd) 973 { 974 return WinSubclassWindow(hwnd,Win32SubclassWindowProc); 975 }
Note:
See TracChangeset
for help on using the changeset viewer.