Changeset 5056 for trunk/src/user32/win32wbase.cpp
- Timestamp:
- Feb 2, 2001, 8:04:03 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/win32wbase.cpp
r4976 r5056 1 /* $Id: win32wbase.cpp,v 1.23 0 2001-01-19 23:03:45sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.231 2001-02-02 19:04:03 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 2221 2221 RECT oldClientRect = rectClient; 2222 2222 2223 if(getWindowHandle() == 0x68000010) {2224 hParent = 0;2225 }2226 2223 if (fuFlags & 2227 2224 ~(SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | … … 2397 2394 } 2398 2395 2399 if(rectClient.left != oldClientRect->left || 2396 if(rectClient.left != oldClientRect->left || 2400 2397 rectClient.top != oldClientRect->top) 2401 2398 { … … 3231 3228 3232 3229 if(dwExStyle == value) { 3233 oldval = value;3230 oldval = value; 3234 3231 break; 3235 }3232 } 3236 3233 ss.styleOld = dwExStyle; 3237 3234 ss.styleNew = value; … … 3241 3238 SendInternalMessageA(WM_STYLECHANGED,GWL_EXSTYLE,(LPARAM)&ss); 3242 3239 oldval = ss.styleOld; 3243 break;3240 break; 3244 3241 } 3245 3242 case GWL_STYLE: … … 3250 3247 3251 3248 if(dwStyle == value) { 3252 oldval = value;3249 oldval = value; 3253 3250 break; 3254 3251 } … … 3270 3267 case GWL_WNDPROC: 3271 3268 { 3272 //Note: Type of SetWindowLong determines new window proc type3269 //Note: Type of SetWindowLong determines new window proc type 3273 3270 // UNLESS the new window proc has already been registered 3274 3271 // (use the old type in that case) 3275 3272 // (VERIFIED in NT 4, SP6) 3276 3273 WINDOWPROCTYPE type = WINPROC_GetProcType((HWINDOWPROC)value); 3277 if(type == WIN_PROC_INVALID) {3278 type = (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A;3279 }3280 oldval = (LONG)WINPROC_GetProc(win32wndproc, (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A);3274 if(type == WIN_PROC_INVALID) { 3275 type = (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A; 3276 } 3277 oldval = (LONG)WINPROC_GetProc(win32wndproc, (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A); 3281 3278 WINPROC_SetProc((HWINDOWPROC *)&win32wndproc, (WNDPROC)value, type, WIN_PROC_WINDOW); 3282 3279 break; … … 3304 3301 if(index >= 0 && index/4 < nrUserWindowLong) 3305 3302 { 3306 3307 3303 oldval = userWindowLong[index/4]; 3304 userWindowLong[index/4] = value; 3308 3305 break; 3309 3306 } 3310 dprintf(("WARNING: SetWindowLong%c %x %d %x returned %x INVALID index!", (fUnicode) ? 'W' : 'A', getWindowHandle(), index, value));3307 dprintf(("WARNING: SetWindowLong%c %x %d %x returned %x INVALID index!", (fUnicode) ? 'W' : 'A', getWindowHandle(), index, value)); 3311 3308 SetLastError(ERROR_INVALID_PARAMETER); 3312 3309 return 0; … … 3336 3333 break; 3337 3334 case GWL_HWNDPARENT: 3338 value = GetParent();3335 value = GetParent(); 3339 3336 break; 3340 3337 case GWL_ID: … … 3362 3359 WORD oldval; 3363 3360 3364 if(index >= 0 && index/4 < nrUserWindowLong)3365 {3361 if(index >= 0 && index/4 < nrUserWindowLong) 3362 { 3366 3363 oldval = ((WORD *)userWindowLong)[index/2]; 3367 3364 ((WORD *)userWindowLong)[index/2] = value; 3368 3365 return oldval; 3369 }3370 SetLastError(ERROR_INVALID_PARAMETER);3371 return 0;3372 }3373 //******************************************************************************3374 //******************************************************************************3375 WORD Win32BaseWindow::GetWindowWord(int index)3376 {3377 if(index >= 0 && index/4 < nrUserWindowLong)3378 {3379 return ((WORD *)userWindowLong)[index/2];3380 3366 } 3381 3367 SetLastError(ERROR_INVALID_PARAMETER); … … 3384 3370 //****************************************************************************** 3385 3371 //****************************************************************************** 3372 WORD Win32BaseWindow::GetWindowWord(int index) 3373 { 3374 if(index >= 0 && index/4 < nrUserWindowLong) 3375 { 3376 return ((WORD *)userWindowLong)[index/2]; 3377 } 3378 SetLastError(ERROR_INVALID_PARAMETER); 3379 return 0; 3380 } 3381 //****************************************************************************** 3382 //****************************************************************************** 3386 3383 void Win32BaseWindow::setWindowId(DWORD id) 3387 3384 { … … 3407 3404 DWORD magic; 3408 3405 3409 if(hwnd == OSLIB_HWND_DESKTOP)3410 {3411 return windowDesktop;3412 }3413 3414 win32wnd = (Win32BaseWindow *)OSLibWinGetWindowULong(hwnd, OFFSET_WIN32WNDPTR);3415 magic = OSLibWinGetWindowULong(hwnd, OFFSET_WIN32PM_MAGIC);3416 3417 if(win32wnd && CheckMagicDword(magic)) {3406 if(hwnd == OSLIB_HWND_DESKTOP) 3407 { 3408 return windowDesktop; 3409 } 3410 3411 win32wnd = (Win32BaseWindow *)OSLibWinGetWindowULong(hwnd, OFFSET_WIN32WNDPTR); 3412 magic = OSLibWinGetWindowULong(hwnd, OFFSET_WIN32PM_MAGIC); 3413 3414 if(win32wnd && CheckMagicDword(magic)) { 3418 3415 return win32wnd; 3419 }3416 } 3420 3417 // dprintf2(("Win32BaseWindow::GetWindowFromOS2Handle: not an Odin os2 window %x", hwnd)); 3421 return 0;3418 return 0; 3422 3419 } 3423 3420 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.