Changeset 4494 for trunk/src/user32/windowclass.cpp
- Timestamp:
- Oct 17, 2000, 7:11:09 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/windowclass.cpp
r3702 r4494 1 /* $Id: windowclass.cpp,v 1.1 1 2000-06-13 21:26:30sandervl Exp $ */1 /* $Id: windowclass.cpp,v 1.12 2000-10-17 17:11:09 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Class Code for OS/2 … … 21 21 #include <controls.h> 22 22 23 #define DBG_LOCALLOG 23 #define DBG_LOCALLOG DBG_windowclass 24 24 #include "dbglocal.h" 25 25 … … 28 28 void RegisterSystemClasses(ULONG hModule) 29 29 { 30 dprintf(("RegisterSystemClasses\n"));31 CONTROLS_Register();30 dprintf(("RegisterSystemClasses\n")); 31 CONTROLS_Register(); 32 32 } 33 33 //****************************************************************************** … … 35 35 void UnregisterSystemClasses() 36 36 { 37 dprintf(("UnregisterSystemClasses\n")); 38 CONTROLS_Unregister(); 39 } 40 //****************************************************************************** 37 dprintf(("UnregisterSystemClasses\n")); 38 CONTROLS_Unregister(); 39 } 40 //****************************************************************************** 41 //Note: RegisterClassA does NOT change the last error if successful! (verified in NT 4, SP6) 41 42 //****************************************************************************** 42 43 ATOM WIN32API RegisterClassA(CONST WNDCLASSA *lpWndClass) … … 45 46 Win32WndClass *wclass; 46 47 47 dprintf(("RegisterClassA\n")); 48 //CB: size new in ex structure 49 wc.cbSize = sizeof(wc); 50 memcpy(&wc.style, lpWndClass, sizeof(WNDCLASSA)); 51 wc.hIconSm = 0; 52 53 if(Win32WndClass::FindClass(wc.hInstance, (LPSTR)wc.lpszClassName)) { 54 dprintf(("RegisterClassA %x %x already exists", wc.hInstance, wc.lpszClassName)); 55 SetLastError(ERROR_CLASS_ALREADY_EXISTS); 56 return 0; 57 } 58 59 wclass = new Win32WndClass(&wc,FALSE); 60 if(wclass == NULL) { 48 dprintf(("RegisterClassA\n")); 49 //CB: size new in ex structure 50 wc.cbSize = sizeof(wc); 51 memcpy(&wc.style, lpWndClass, sizeof(WNDCLASSA)); 52 wc.hIconSm = 0; 53 54 if(Win32WndClass::FindClass(wc.hInstance, (LPSTR)wc.lpszClassName)) { 55 if(HIWORD(wc.lpszClassName)) { 56 dprintf(("RegisterClassA %x %s already exists", wc.hInstance, wc.lpszClassName)); 57 } 58 else dprintf(("RegisterClassA %x %x already exists", wc.hInstance, wc.lpszClassName)); 59 SetLastError(ERROR_CLASS_ALREADY_EXISTS); 60 return 0; 61 } 62 63 wclass = new Win32WndClass(&wc,FALSE); 64 if(wclass == NULL) { 61 65 dprintf(("ERROR: RegisterClassA winclass == NULL!")); 62 DebugInt3(); 63 return(0); 64 } 65 return(wclass->getAtom()); 66 } 67 //****************************************************************************** 66 DebugInt3(); 67 return(0); 68 } 69 return(wclass->getAtom()); 70 } 71 //****************************************************************************** 72 //Note: RegisterClassA does NOT change the last error if successful! (verified in NT 4, SP6) 68 73 //****************************************************************************** 69 74 ATOM WIN32API RegisterClassExA(CONST WNDCLASSEXA *lpWndClass) … … 71 76 Win32WndClass *wclass; 72 77 73 if(Win32WndClass::FindClass(lpWndClass->hInstance, (LPSTR)lpWndClass->lpszClassName)) { 74 dprintf(("RegisterClassExA %x %x already exists", lpWndClass->hInstance, lpWndClass->lpszClassName)); 75 SetLastError(ERROR_CLASS_ALREADY_EXISTS); 76 return 0; 77 } 78 79 dprintf(("RegisterClassExA\n")); 80 wclass = new Win32WndClass((WNDCLASSEXA *)lpWndClass,FALSE); 81 if(wclass == NULL) { 78 if(Win32WndClass::FindClass(lpWndClass->hInstance, (LPSTR)lpWndClass->lpszClassName)) { 79 if(HIWORD(lpWndClass->lpszClassName)) { 80 dprintf(("RegisterClassExA %x %s already exists", lpWndClass->hInstance, lpWndClass->lpszClassName)); 81 } 82 else dprintf(("RegisterClassExA %x %x already exists", lpWndClass->hInstance, lpWndClass->lpszClassName)); 83 SetLastError(ERROR_CLASS_ALREADY_EXISTS); 84 return 0; 85 } 86 87 dprintf(("RegisterClassExA\n")); 88 wclass = new Win32WndClass((WNDCLASSEXA *)lpWndClass,FALSE); 89 if(wclass == NULL) { 82 90 dprintf(("ERROR: RegisterClassExA winclass == NULL!")); 83 DebugInt3(); 84 return(0); 85 } 86 return(wclass->getAtom()); 87 } 88 //****************************************************************************** 91 DebugInt3(); 92 return(0); 93 } 94 return(wclass->getAtom()); 95 } 96 //****************************************************************************** 97 //Note: RegisterClassA does NOT change the last error if successful! (verified in NT 4, SP6) 89 98 //****************************************************************************** 90 99 WORD WIN32API RegisterClassW(CONST WNDCLASSW *lpwc) … … 100 109 101 110 if(Win32WndClass::FindClass(wc.hInstance, (LPWSTR)wc.lpszClassName)) { 102 103 104 111 dprintf(("RegisterClassW %x %x already exists", wc.hInstance, wc.lpszClassName)); 112 SetLastError(ERROR_CLASS_ALREADY_EXISTS); 113 return 0; 105 114 } 106 115 … … 108 117 if(winclass == NULL) { 109 118 dprintf(("ERROR: RegisterClassW winclass == NULL!")); 110 111 119 DebugInt3(); 120 return 0; 112 121 } 113 122 rc = winclass->getAtom(); … … 116 125 } 117 126 //****************************************************************************** 127 //Note: RegisterClassA does NOT change the last error if successful! (verified in NT 4, SP6) 118 128 //****************************************************************************** 119 129 ATOM WIN32API RegisterClassExW(CONST WNDCLASSEXW *lpwc) … … 127 137 128 138 if(Win32WndClass::FindClass(wc.hInstance, (LPWSTR)wc.lpszClassName)) { 129 130 131 139 dprintf(("RegisterClassW %x %x already exists", wc.hInstance, wc.lpszClassName)); 140 SetLastError(ERROR_CLASS_ALREADY_EXISTS); 141 return 0; 132 142 } 133 143 … … 135 145 if(winclass == NULL) { 136 146 dprintf(("ERROR: RegisterClassExW winclass == NULL!")); 137 147 DebugInt3(); 138 148 return(0); 139 149 } … … 178 188 Win32WndClass *wndclass; 179 189 180 dprintf(("USER32: GetClassInfoA\n")); 190 if(HIWORD(lpszClass) != 0) { 191 dprintf(("USER32: GetClassInfoA %x %s %x", hInstance, lpszClass, lpwc)); 192 } 193 else dprintf(("USER32: GetClassInfoA %x %x %x", hInstance, lpszClass, lpwc)); 181 194 182 195 wndclass = Win32WndClass::FindClass(hInstance, (LPSTR)lpszClass); … … 247 260 if(wndclass) { 248 261 wndclass->getClassInfo(lpwcx); 249 262 lpwcx->cbSize = sizeof(WNDCLASSEXA); 250 263 return(TRUE); 251 264 } … … 289 302 if(wndclass) { 290 303 wndclass->getClassInfo(lpwcx); 291 304 lpwcx->cbSize = sizeof(WNDCLASSEXW); 292 305 return(TRUE); 293 306 }
Note:
See TracChangeset
for help on using the changeset viewer.