Changeset 5060
- Timestamp:
- Feb 3, 2001, 7:52:03 PM (24 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/user32/oslibwin.cpp ¶
r4825 r5060 1 /* $Id: oslibwin.cpp,v 1.8 5 2000-12-17 15:04:10sandervl Exp $ */1 /* $Id: oslibwin.cpp,v 1.86 2001-02-03 18:52:02 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 69 69 Owner = HWND_DESKTOP; 70 70 } 71 BOOL TopLevel = hwndParent == HWND_DESKTOP;72 71 73 72 if(classStyle & CS_SAVEBITS_W) dwWinStyle |= WS_SAVEBITS; … … 88 87 89 88 return WinCreateWindow (hwndParent, 90 hwndParent == HWND_DESKTOP? WIN32_STDFRAMECLASS : WIN32_STDCLASS,89 (hwndParent == HWND_DESKTOP) ? WIN32_STDFRAMECLASS : WIN32_STDCLASS, 91 90 pszName, dwWinStyle, 0, 0, 0, 0, 92 91 Owner, (fHWND_BOTTOM) ? HWND_BOTTOM : HWND_TOP, -
TabularUnified trunk/src/user32/win32wbase.cpp ¶
r5056 r5060 1 /* $Id: win32wbase.cpp,v 1.23 1 2001-02-02 19:04:03sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.232 2001-02-03 18:52:02 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 889 889 if(SendInternalMessageA(WM_NCACTIVATE, fActivate, 0) == FALSE && !fActivate) 890 890 { 891 dprintf(("WARNING: WM_NCACTIVATE return code = FALSE -> cancel processing"));891 dprintf(("WARNING: WM_NCACTIVATE return code = FALSE -> cancel processing")); 892 892 return 0; 893 893 } … … 904 904 threadidhwnd = O32_GetWindowThreadProcessId(hwndOS2Win, &procidhwnd); 905 905 } 906 //Warning: temporary hack to force focus to newly created window 907 //RealPlayer 8 does not pass WM_ACTIVATE to defwindowproc and doesn't call 908 //setfocus -> keyboard focus not set 909 //TODO: Find real cause!! 910 if(GetFocus() == 0 && fActivate) { 911 if(!(getStyle() & WS_MINIMIZE)) 912 SetFocus(getWindowHandle()); 913 } 914 //Warning: temporary hack to force focus to newly created window 906 915 907 916 if(fActivate) { … … 1424 1433 1425 1434 case WM_ACTIVATE: 1426 /* The default action in Windows is to set the keyboard focus to1427 * the window, if it's being activated and not minimized */1435 /* The default action in Windows is to set the keyboard focus to 1436 * the window, if it's being activated and not minimized */ 1428 1437 if (LOWORD(wParam) != WA_INACTIVE) { 1429 if(!(getStyle() & WS_MINIMIZE))1430 SetFocus(getWindowHandle());1438 if(!(getStyle() & WS_MINIMIZE)) 1439 SetFocus(getWindowHandle()); 1431 1440 } 1432 1441 return 0; … … 2562 2571 } 2563 2572 //****************************************************************************** 2573 //Note: does not set last error if no parent (verified in NT4, SP6) 2564 2574 //****************************************************************************** 2565 2575 HWND Win32BaseWindow::GetParent() … … 3306 3316 } 3307 3317 dprintf(("WARNING: SetWindowLong%c %x %d %x returned %x INVALID index!", (fUnicode) ? 'W' : 'A', getWindowHandle(), index, value)); 3308 SetLastError(ERROR_INVALID_ PARAMETER);3318 SetLastError(ERROR_INVALID_INDEX); //verified in NT4, SP6 3309 3319 return 0; 3310 3320 } 3321 //Note: NT4, SP6 does not set the last error to 0 3311 3322 SetLastError(ERROR_SUCCESS); 3312 3323 dprintf2(("SetWindowLong%c %x %d %x returned %x", (fUnicode) ? 'W' : 'A', getWindowHandle(), index, value, oldval)); … … 3347 3358 break; 3348 3359 } 3349 SetLastError(ERROR_INVALID_ PARAMETER);3360 SetLastError(ERROR_INVALID_INDEX); //verified in NT4, SP6 3350 3361 return 0; 3351 3362 } 3352 3363 dprintf2(("GetWindowLongA %x %d %x", getWindowHandle(), index, value)); 3364 //Note: NT4, SP6 does not set the last error to 0 3365 SetLastError(ERROR_SUCCESS); 3353 3366 return value; 3354 3367 } … … 3363 3376 oldval = ((WORD *)userWindowLong)[index/2]; 3364 3377 ((WORD *)userWindowLong)[index/2] = value; 3378 //Note: NT4, SP6 does not set the last error to 0 3379 SetLastError(ERROR_SUCCESS); 3365 3380 return oldval; 3366 3381 } 3367 SetLastError(ERROR_INVALID_ PARAMETER);3382 SetLastError(ERROR_INVALID_INDEX); //verified in NT4, SP6 3368 3383 return 0; 3369 3384 } … … 3374 3389 if(index >= 0 && index/4 < nrUserWindowLong) 3375 3390 { 3391 //Note: NT4, SP6 does not set the last error to 0 3392 SetLastError(ERROR_SUCCESS); 3376 3393 return ((WORD *)userWindowLong)[index/2]; 3377 3394 } 3378 SetLastError(ERROR_INVALID_ PARAMETER);3395 SetLastError(ERROR_INVALID_INDEX); //verified in NT4, SP6 3379 3396 return 0; 3380 3397 } -
TabularUnified trunk/src/user32/window.cpp ¶
r4848 r5060 1 /* $Id: window.cpp,v 1.8 6 2000-12-29 18:40:00sandervl Exp $ */1 /* $Id: window.cpp,v 1.87 2001-02-03 18:52:02 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 321 321 } 322 322 //****************************************************************************** 323 //Note: does not set last error if no parent (verified in NT4, SP6) 323 324 //****************************************************************************** 324 325 HWND WIN32API GetParent( HWND hwnd) … … 332 333 return 0; 333 334 } 334 // dprintf(("GetParent %x", hwnd));335 dprintf2(("GetParent %x", hwnd)); 335 336 return window->GetParent(); 336 337 } … … 348 349 } 349 350 if(hwndNewParent == HWND_DESKTOP) { 350 hwndNewParent = GetDesktopWindow();351 hwndNewParent = GetDesktopWindow(); 351 352 } 352 353 else { -
TabularUnified trunk/src/user32/windowword.cpp ¶
r4945 r5060 1 /* $Id: windowword.cpp,v 1. 9 2001-01-14 17:15:47sandervl Exp $ */1 /* $Id: windowword.cpp,v 1.10 2001-02-03 18:52:03 sandervl Exp $ */ 2 2 3 3 /* … … 15 15 #include <win32wbase.h> 16 16 17 #define DBG_LOCALLOG 17 #define DBG_LOCALLOG DBG_windowword 18 18 #include "dbglocal.h" 19 19 … … 27 27 if(window) 28 28 { 29 return window->SetWindowLongA(nIndex,lNewLong);29 return window->SetWindowLongA(nIndex,lNewLong); 30 30 } 31 31 else { 32 dprintf(("SetWindowLongA %d %x; window %x not found!", nIndex, lNewLong, hwnd)); 32 dprintf(("SetWindowLongA %d %x; window %x not found!", nIndex, lNewLong, hwnd)); 33 SetLastError(ERROR_INVALID_WINDOW_HANDLE); //verified in NT4, SP6 34 return 0; 33 35 } 34 return 0;35 36 } 36 37 //****************************************************************************** … … 43 44 if(window) 44 45 { 45 return window->SetWindowLongA(nIndex,lNewLong, TRUE);46 return window->SetWindowLongA(nIndex,lNewLong, TRUE); 46 47 } 47 48 else { 48 dprintf(("SetWindowLongW; window %x not found!", hwnd)); 49 dprintf(("SetWindowLongW; window %x not found!", hwnd)); 50 SetLastError(ERROR_INVALID_WINDOW_HANDLE); //verified in NT4, SP6 51 return 0; 49 52 } 50 return 0;51 53 } 52 54 //****************************************************************************** … … 64 66 { 65 67 dprintf(("GetWindowWord; window %x not found!", hwnd)); 68 SetLastError(ERROR_INVALID_WINDOW_HANDLE); //verified in NT4, SP6 69 return 0; 66 70 } 67 return 0;68 71 } 69 72 //****************************************************************************** … … 81 84 { 82 85 dprintf(("SetWindowWord; window %x not found!", hwnd)); 86 SetLastError(ERROR_INVALID_WINDOW_HANDLE); //verified in NT4, SP6 87 return 0; 83 88 } 84 return 0;85 89 } 86 90 //****************************************************************************** … … 98 102 { 99 103 dprintf(("GetWindowLongA; window %x (%d) not found!", hwnd, nIndex)); 104 SetLastError(ERROR_INVALID_WINDOW_HANDLE); //verified in NT4, SP6 105 return 0; 100 106 } 101 return 0;102 107 } 103 108 //****************************************************************************** … … 115 120 { 116 121 dprintf(("GetWindowLongW; window %x not found!", hwnd)); 122 SetLastError(ERROR_INVALID_WINDOW_HANDLE); //verified in NT4, SP6 123 return 0; 117 124 } 118 return 0;119 125 } 120 126 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.