- Timestamp:
- Mar 20, 2003, 2:20:46 PM (22 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/Makefile
r9810 r9930 1 # $Id: Makefile,v 1.10 5 2003-02-16 15:31:08sandervl Exp $1 # $Id: Makefile,v 1.106 2003-03-20 13:20:44 sandervl Exp $ 2 2 3 3 # … … 65 65 $(OBJDIR)\win32wndhandle.obj \ 66 66 $(OBJDIR)\win32wmisc.obj \ 67 $(OBJDIR)\win32wdesktop.obj \ 68 $(OBJDIR)\win32wfake.obj \ 67 69 $(OBJDIR)\windowword.obj \ 68 70 $(OBJDIR)\windowmsg.obj \ … … 73 75 $(OBJDIR)\win32wmdiclient.obj \ 74 76 $(OBJDIR)\mdi.obj \ 75 $(OBJDIR)\win32wdesktop.obj \76 77 $(OBJDIR)\win32dlg.obj \ 77 78 $(OBJDIR)\windlgmsg.obj \ -
trunk/src/user32/dbglocal.cpp
r9810 r9930 1 /* $Id: dbglocal.cpp,v 1.1 5 2003-02-16 15:31:09sandervl Exp $ */1 /* $Id: dbglocal.cpp,v 1.16 2003-03-20 13:20:44 sandervl Exp $ */ 2 2 3 3 /* … … 97 97 "dragdrop", 98 98 "oslibclip", 99 "oslibkbd" 99 "oslibkbd", 100 "win32wfake" 100 101 }; 101 102 //****************************************************************************** -
trunk/src/user32/dbglocal.h
r9810 r9930 1 /* $Id: dbglocal.h,v 1.1 2 2003-02-16 15:31:09sandervl Exp $ */1 /* $Id: dbglocal.h,v 1.13 2003-03-20 13:20:44 sandervl Exp $ */ 2 2 3 3 /* … … 96 96 #define DBG_oslibclip 74 97 97 #define DBG_oslibkbd 75 98 #define DBG_MAXFILES 76 98 #define DBG_win32wfake 76 99 #define DBG_MAXFILES 77 99 100 100 101 extern USHORT DbgEnabledUSER32[DBG_MAXFILES]; -
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 { -
trunk/src/user32/pmwindow.h
r9437 r9930 1 /* $Id: pmwindow.h,v 1.1 8 2002-11-27 13:56:27sandervl Exp $ */1 /* $Id: pmwindow.h,v 1.19 2003-03-20 13:20:45 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 21 21 void RegisterSystemClasses(ULONG hModule); 22 22 void UnregisterSystemClasses(); 23 24 PVOID PMWinSubclassFakeWindow(HWND hwndOS2); 23 25 24 26 extern ULONG ScreenWidth; -
trunk/src/user32/win32wbase.cpp
r9871 r9930 1 /* $Id: win32wbase.cpp,v 1.36 1 2003-02-28 09:56:00sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.362 2003-03-20 13:20:45 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 92 92 //****************************************************************************** 93 93 //****************************************************************************** 94 Win32BaseWindow::Win32BaseWindow(HWND hwndOS2, ATOM classAtom)95 : GenericObject(&windows, &critsect), ChildWindow(&critsect)96 {97 Init();98 OS2Hwnd = OS2HwndFrame = hwndOS2;99 100 /* Find the window class */101 windowClass = Win32WndClass::FindClass(NULL, (LPSTR)classAtom);102 if (!windowClass)103 {104 char buffer[32];105 GlobalGetAtomNameA( classAtom, buffer, sizeof(buffer) );106 dprintf(("Bad class '%s'", buffer ));107 DebugInt3();108 }109 110 //Allocate window words111 nrUserWindowBytes = windowClass->getExtraWndBytes();112 if(nrUserWindowBytes) {113 userWindowBytes = (char *)_smalloc(nrUserWindowBytes);114 memset(userWindowBytes, 0, nrUserWindowBytes);115 }116 117 WINPROC_SetProc((HWINDOWPROC *)&win32wndproc, windowClass->getWindowProc((isUnicode) ? WNDPROC_UNICODE : WNDPROC_ASCII), WINPROC_GetProcType(windowClass->getWindowProc((isUnicode) ? WNDPROC_UNICODE : WNDPROC_ASCII)), WIN_PROC_WINDOW);118 hInstance = NULL;119 dwStyle = WS_VISIBLE;120 dwOldStyle = dwStyle;121 dwExStyle = 0;122 123 //We pretend this window has no parent and won't change size124 //(dangerous assumption!!)125 OSLibWinQueryWindowClientRect(OS2Hwnd, &rectClient);126 OSLibQueryWindowRectAbsolute (OS2Hwnd, &rectWindow);127 128 fFakeWindow = TRUE;129 }130 //******************************************************************************131 //******************************************************************************132 94 Win32BaseWindow::Win32BaseWindow(CREATESTRUCTA *lpCreateStructA, ATOM classAtom, BOOL isUnicode) 133 95 : GenericObject(&windows, &critsect), ChildWindow(&critsect) … … 156 118 fVisibleRegionChanged = FALSE; 157 119 fEraseBkgndFlag = TRUE; 158 fFakeWindow = FALSE;159 120 fIsDragDropActive= FALSE; 160 121 … … 232 193 lpVisRgnNotifyProc = NULL; 233 194 dwVisRgnNotifyParam = NULL; 195 196 pfnOldPMWndProc = NULL; 234 197 } 235 198 //****************************************************************************** … … 3509 3472 dprintf(("GetWindow %x %d returned %x", getWindowHandle(), uCmd, hwndRelated)); 3510 3473 return hwndRelated; 3474 } 3475 //****************************************************************************** 3476 //****************************************************************************** 3477 PRECT Win32BaseWindow::getWindowRect() 3478 { 3479 return &rectWindow; 3511 3480 } 3512 3481 //****************************************************************************** -
trunk/src/user32/win32wbase.h
r9598 r9930 1 /* $Id: win32wbase.h,v 1.14 8 2003-01-03 16:35:56 sandervl Exp $ */1 /* $Id: win32wbase.h,v 1.149 2003-03-20 13:20:46 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 113 113 Win32BaseWindow(); 114 114 Win32BaseWindow(CREATESTRUCTA *lpCreateStructA, ATOM classAtom, BOOL isUnicode); 115 Win32BaseWindow(HWND hwndOS2, ATOM classAtom);116 115 117 116 virtual ~Win32BaseWindow(); … … 201 200 } 202 201 void setClientRect(PRECT rect) { rectClient = *rect; }; 203 PRECT getWindowRect() { return &rectWindow; };202 virtual PRECT getWindowRect(); 204 203 void setClientRect(LONG left, LONG top, LONG right, LONG bottom) 205 204 { … … 232 231 233 232 BOOL ShowWindow(ULONG nCmdShow); 234 233 virtual BOOL SetWindowPos(HWND hwndInsertAfter, int x, int y, int cx, int cy, UINT fuFlags, BOOL fShowWindow = FALSE); 235 234 BOOL SetWindowPlacement(WINDOWPLACEMENT *winpos); 236 235 BOOL GetWindowPlacement(LPWINDOWPLACEMENT winpos); … … 246 245 HWND GetTopWindow(); 247 246 HWND GetTopParent(); 247 248 PVOID getOldPMWindowProc() { return pfnOldPMWndProc; }; 249 void setOldPMWindowProc(PVOID pfnPMWndProc) { pfnOldPMWndProc = pfnPMWndProc; }; 248 250 249 251 HWND GetWindow(UINT uCmd); … … 414 416 fVisibleRegionChanged:1, //set when visible region has changed -> erase background must be sent during next BeginPaint 415 417 fEraseBkgndFlag:1, 416 fIsDragDropActive:1, 417 fFakeWindow:1; 418 fIsDragDropActive:1; 418 419 419 420 ULONG state; … … 437 438 RECT rectClient; //relative to frame 438 439 WINDOWPLACEMENT windowpos; 440 441 PVOID pfnOldPMWndProc; 439 442 440 443 PROPERTY *propertyList; -
trunk/src/user32/window.cpp
r9928 r9930 1 /* $Id: window.cpp,v 1.13 2 2003-03-20 09:15:31sandervl Exp $ */1 /* $Id: window.cpp,v 1.133 2003-03-20 13:20:46 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 262 262 RELEASE_WNDOBJ(window); 263 263 return hwnd; 264 }265 //******************************************************************************266 //******************************************************************************267 HWND WIN32API CreateFakeWindowEx(HWND hwndOS2, ATOM classAtom)268 {269 Win32BaseWindow *window;270 271 window = new Win32BaseWindow(hwndOS2, classAtom);272 if(window == NULL)273 {274 dprintf(("Win32BaseWindow creation failed!!"));275 return 0;276 }277 HWND hwnd = window->getWindowHandle();278 279 // set myself as last active popup / window280 window->setLastActive( hwnd );281 282 RELEASE_WNDOBJ(window);283 return hwnd;284 }285 //******************************************************************************286 //******************************************************************************287 BOOL WIN32API DestroyFakeWindow(HWND hwnd)288 {289 Win32BaseWindow *window;290 291 window = Win32BaseWindow::GetWindowFromHandle(hwnd);292 if(!window) {293 dprintf(("DestroyFakeWindow, window %x not found", hwnd));294 SetLastError(ERROR_INVALID_WINDOW_HANDLE);295 return 0;296 }297 delete window;298 return TRUE;299 264 } 300 265 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.