Changeset 10284 for trunk/src/user32/pmwindow.cpp
- Timestamp:
- Oct 22, 2003, 2:43:14 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/pmwindow.cpp
r10276 r10284 1 /* $Id: pmwindow.cpp,v 1.22 1 2003-10-20 17:18:14 sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.222 2003-10-22 12:43:14 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 81 81 BOOL fDragDropDisabled = FALSE; 82 82 83 char WIN32_CDCLASS[255] = "Win32CDWindowClass"; 84 char WIN32_STDCLASS[255] = "Win32WindowClass"; 85 char WIN32_STDFRAMECLASS[255] = "Win32FrameClass"; 83 const char WIN32_CDCLASS[] = "Win32CDWindowClass"; 84 char WIN32_STDCLASS[255] = "Win32WindowClass"; 86 85 87 86 #define PMMENU_MINBUTTON 0 … … 106 105 HBITMAP hBmpCloseButtonDown = 0; 107 106 108 staticPFNWP pfnFrameWndProc = NULL;107 PFNWP pfnFrameWndProc = NULL; 109 108 static HWND hwndFocusChange = 0; 110 109 HWND hwndCD = 0; … … 215 214 } 216 215 216 //We no longer register our own frame window class as there is code in PM 217 //that makes assumptions about frame window class names. 218 //Instead we subclass the frame window right after creating it. 217 219 CLASSINFO FrameClassInfo; 218 220 if(!WinQueryClassInfo (hab, WC_FRAME, &FrameClassInfo)) { … … 223 225 224 226 dprintf(("WC_FRAME style %x", FrameClassInfo.flClassStyle)); 225 226 // this is our OS/2 window class for frame windows227 if(!WinRegisterClass( /* Register window class */228 hab, /* Anchor block handle */229 (PSZ)WIN32_STDFRAMECLASS, /* Window class name */230 (PFNWP)Win32FrameWindowProc, /* Address of window procedure */231 CS_FRAME,232 FrameClassInfo.cbWindowData))233 {234 dprintf(("WinRegisterClass Win32BaseWindow failed %x", WinGetLastError(hab)));235 return(FALSE);236 }237 227 238 228 // get the screen dimensions and store them … … 506 496 POSTMSG_PACKET *postmsg; 507 497 OSLIBPOINT point, ClientPoint; 508 498 EXCEPTIONREGISTRATIONRECORD exceptRegRec = {0,0}; 499 500 ODIN_SetExceptionHandler(&exceptRegRec); 509 501 // restore our FS selector 510 502 SetWin32TIB(); … … 583 575 RELEASE_WNDOBJ(win32wnd); 584 576 RestoreOS2TIB(); 577 ODIN_UnsetExceptionHandler(&exceptRegRec); 585 578 586 579 #ifdef DEBUG … … 1155 1148 if(win32wnd) RELEASE_WNDOBJ(win32wnd); 1156 1149 RestoreOS2TIB(); 1150 ODIN_UnsetExceptionHandler(&exceptRegRec); 1157 1151 1158 1152 #ifdef DEBUG … … 1166 1160 1167 1161 RestoreOS2TIB(); 1162 ODIN_UnsetExceptionHandler(&exceptRegRec); 1168 1163 1169 1164 #ifdef DEBUG … … 1182 1177 MRESULT rc = 0; 1183 1178 MSG winMsg, *pWinMsg; 1179 EXCEPTIONREGISTRATIONRECORD exceptRegRec = {0,0}; 1184 1180 1185 1181 #ifdef DEBUG … … 1187 1183 #endif 1188 1184 1185 ODIN_SetExceptionHandler(&exceptRegRec); 1189 1186 //Restore our FS selector 1190 1187 SetWin32TIB(); … … 2172 2169 if(win32wnd) RELEASE_WNDOBJ(win32wnd); 2173 2170 RestoreOS2TIB(); 2171 ODIN_UnsetExceptionHandler(&exceptRegRec); 2174 2172 2175 2173 #ifdef DEBUG … … 2182 2180 if(win32wnd) RELEASE_WNDOBJ(win32wnd); 2183 2181 RestoreOS2TIB(); 2182 ODIN_UnsetExceptionHandler(&exceptRegRec); 2184 2183 2185 2184 #ifdef DEBUG … … 2192 2191 if(win32wnd) RELEASE_WNDOBJ(win32wnd); 2193 2192 RestoreOS2TIB(); 2193 ODIN_UnsetExceptionHandler(&exceptRegRec); 2194 2194 2195 2195 //calling WinDefWindowProc here breaks Opera hotlist window (WM_ADJUSTWINDOWPOS) … … 2229 2229 rc = pfnOldWindowProc(hwnd, msg, mp1, mp2); 2230 2230 2231 ODIN_SetExceptionHandler(&exceptRegRec); 2231 2232 SetWin32TIB(); 2232 2233 switch(msg) { … … 2250 2251 if(win32wnd) RELEASE_WNDOBJ(win32wnd); 2251 2252 RestoreOS2TIB(); 2253 ODIN_UnsetExceptionHandler(&exceptRegRec); 2252 2254 return rc; 2253 2255 … … 2464 2466 } 2465 2467 2466 // @@PF Three funcs to override std class names we use in Odin 2467 //****************************************************************************** 2468 //****************************************************************************** 2469 void WIN32API SetCustomCDClassName(LPSTR pszCDClassName) 2470 { 2471 strcpy(WIN32_CDCLASS, pszCDClassName); 2472 } 2473 //****************************************************************************** 2468 //****************************************************************************** 2469 // Override std class names we use in Odin (necessary for keyboard hook) 2474 2470 //****************************************************************************** 2475 2471 void WIN32API SetCustomStdClassName(LPSTR pszStdClassName) 2476 2472 { 2477 2473 strcpy(WIN32_STDCLASS, pszStdClassName); 2478 }2479 //******************************************************************************2480 //******************************************************************************2481 void WIN32API SetCustomStdFrameClassName(LPSTR pszStdFrameClassName)2482 {2483 strcpy(WIN32_STDFRAMECLASS, pszStdFrameClassName);2484 2474 } 2485 2475 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.