Changeset 9930 for trunk/src/user32/pmwindow.cpp
- Timestamp:
- Mar 20, 2003, 2:20:46 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/pmwindow.cpp
r9866 r9930 1 /* $Id: pmwindow.cpp,v 1.20 1 2003-02-27 14:22:43sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.202 2003-03-20 13:20:44 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 2048 2048 //****************************************************************************** 2049 2049 //****************************************************************************** 2050 MRESULT EXPENTRY Win32FakeWindowProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 2051 { 2052 PFNWP pfnOldWindowProc; 2053 Win32BaseWindow *win32wnd, *win32wndchild; 2054 TEB *teb; 2055 MRESULT rc = 0; 2056 2057 //Restore our FS selector 2058 SetWin32TIB(); 2059 2060 //We can't query the window object directly from this window as it's not the 2061 //real thing. There should be a genuine win32 child window which we can use. 2062 HWND hwndChild = WinQueryWindow(hwnd, QW_TOP); 2063 2064 win32wndchild = Win32BaseWindow::GetWindowFromOS2FrameHandle(hwndChild); 2065 if(win32wndchild == NULL) { 2066 DebugInt3(); 2067 goto RunDefWndProc; 2068 } 2069 //now get the parent window object 2070 win32wnd = Win32BaseWindow::GetWindowFromHandle(GetParent(win32wndchild->getWindowHandle())); 2071 if(win32wndchild) RELEASE_WNDOBJ(win32wndchild); 2072 2073 if(win32wnd == NULL) { 2074 DebugInt3(); 2075 goto RunDefWndProc; 2076 } 2077 2078 pfnOldWindowProc = (PFNWP)win32wnd->getOldPMWindowProc(); 2079 if(pfnOldWindowProc == NULL) { 2080 DebugInt3(); 2081 goto RunDefWndProc; 2082 } 2083 2084 rc = pfnOldWindowProc(hwnd, msg, mp1, mp2); 2085 switch(msg) { 2086 case WM_WINDOWPOSCHANGED: 2087 { 2088 PSWP pswp = (PSWP)mp1,pswpOld = pswp+1; 2089 SWP swpOld = *(pswp + 1); 2090 WINDOWPOS wp; 2091 2092 if(win32wnd->getParent()) { 2093 OSLibMapSWPtoWINDOWPOS(pswp, &wp, &swpOld, win32wnd->getParent()->getClientHeight(), 2094 hwnd); 2095 } 2096 else OSLibMapSWPtoWINDOWPOS(pswp, &wp, &swpOld, OSLibQueryScreenHeight(), hwnd); 2097 2098 win32wnd->SetWindowPos(wp.hwndInsertAfter, wp.x, wp.y, wp.cx, wp.cy, wp.flags); 2099 break; 2100 } 2101 2102 } 2103 if(win32wnd) RELEASE_WNDOBJ(win32wnd); 2104 RestoreOS2TIB(); 2105 return rc; 2106 2107 RunDefWndProc: 2108 RestoreOS2TIB(); 2109 return WinDefWindowProc( hwnd, msg, mp1, mp2 ); 2110 } 2111 //****************************************************************************** 2112 // PMWinSubclassFakeWindow 2113 // 2114 // Subclass a fake window (converted PM window) 2115 // 2116 // Parameters 2117 // 2118 // HWND hwndOS2 - PM handle of fake window 2119 // 2120 // Returns 2121 // NULL - Failure 2122 // else - Old PM window procedure 2123 // 2124 //****************************************************************************** 2125 PVOID PMWinSubclassFakeWindow(HWND hwndOS2) 2126 { 2127 return WinSubclassWindow(hwndOS2, Win32FakeWindowProc); 2128 } 2129 //****************************************************************************** 2130 //****************************************************************************** 2050 2131 void FrameSetFocus(HWND hwnd) 2051 2132 {
Note:
See TracChangeset
for help on using the changeset viewer.