- Timestamp:
- Feb 17, 2001, 3:49:26 PM (25 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/dc.cpp
r5045 r5146 1 /* $Id: dc.cpp,v 1.8 3 2001-02-01 18:02:20sandervl Exp $ */1 /* $Id: dc.cpp,v 1.84 2001-02-17 14:49:25 sandervl Exp $ */ 2 2 3 3 /* … … 1374 1374 } 1375 1375 else dprintf(("InvalidateRect %x NULL erase=%d", hwnd, erase)); 1376 #if 1 1377 result = RedrawWindow (hwnd, pRect, NULLHANDLE, 1378 RDW_ALLCHILDREN_W | RDW_INVALIDATE_W | 1379 (erase ? RDW_ERASE_W : 0) | 1380 (hwnd == NULLHANDLE ? RDW_UPDATENOW_W : 0)); 1381 #else 1376 1382 result = RedrawWindow (hwnd, pRect, NULLHANDLE, 1377 1383 RDW_ALLCHILDREN_W | RDW_INVALIDATE_W | 1378 1384 (erase ? RDW_ERASE_W : RDW_NOERASE_W) | 1379 1385 (hwnd == NULLHANDLE ? RDW_UPDATENOW_W : 0)); 1386 #endif 1380 1387 return (result); 1381 1388 } … … 1387 1394 1388 1395 dprintf(("InvalidateRgn %x %x erase=%d", hwnd, hrgn, erase)); 1396 #if 1 1397 result = RedrawWindow (hwnd, NULL, hrgn, 1398 RDW_ALLCHILDREN_W | RDW_INVALIDATE_W | 1399 (erase ? RDW_ERASE_W : 0) | 1400 (hwnd == NULLHANDLE ? RDW_UPDATENOW_W : 0)); 1401 #else 1389 1402 result = RedrawWindow (hwnd, NULL, hrgn, 1390 1403 RDW_ALLCHILDREN_W | RDW_INVALIDATE_W | 1391 1404 (erase ? RDW_ERASE_W : RDW_NOERASE_W) | 1392 1405 (hwnd == NULLHANDLE ? RDW_UPDATENOW_W : 0)); 1406 #endif 1393 1407 return (result); 1394 1408 } -
trunk/src/user32/pmwindow.cpp
r5137 r5146 1 /* $Id: pmwindow.cpp,v 1.11 3 2001-02-15 00:33:01sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.114 2001-02-17 14:49:26 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 222 222 else 223 223 if(msg == WIN32APP_SETFOCUSMSG) { 224 //PM doesn't allow SetFocus calls during WM_SETFOCUS message processing; 224 //PM doesn't allow SetFocus calls during WM_SETFOCUS message processing; 225 225 //must delay this function call 226 226 //mp1 = win32 window handle … … 379 379 { 380 380 //Only send PM WM_ACTIVATE to top-level windows (frame windows) 381 if(!(WinQueryWindowU Short(hwnd,QWS_FLAGS) & FF_ACTIVE))381 if(!(WinQueryWindowULong(hwnd, OFFSET_WIN32FLAGS) & FF_ACTIVE)) 382 382 { 383 if(isFrame) {384 383 WinSendMsg(hwnd, WM_ACTIVATE, (MPARAM)TRUE, (MPARAM)hwnd); 385 }386 else387 if(win32wnd->IsWindowCreated()) {388 win32wnd->MsgActivate(1, 0, win32wnd->getWindowHandle(), hwnd);389 }390 384 } 391 385 } … … 501 495 { 502 496 //Only send PM WM_ACTIVATE to top-level windows (frame windows) 503 if(!(WinQueryWindowU Short(hwnd,QWS_FLAGS) & FF_ACTIVE))497 if(!(WinQueryWindowULong(hwnd, OFFSET_WIN32FLAGS) & FF_ACTIVE)) 504 498 { 505 499 if(isFrame) { … … 519 513 case WM_ACTIVATE: 520 514 { 521 USHORT flags = WinQueryWindowU Short(hwnd,QWS_FLAGS);515 USHORT flags = WinQueryWindowULong(hwnd, OFFSET_WIN32FLAGS); 522 516 523 517 dprintf(("OS2: WM_ACTIVATE %x %x %x", hwnd, mp1, mp2)); 524 518 525 WinSetWindowU Short(hwnd,QWS_FLAGS, SHORT1FROMMP(mp1) ? (flags | FF_ACTIVE):(flags & ~FF_ACTIVE));519 WinSetWindowULong(hwnd, OFFSET_WIN32FLAGS, SHORT1FROMMP(mp1) ? (flags | FF_ACTIVE):(flags & ~FF_ACTIVE)); 526 520 if(win32wnd->IsWindowCreated()) 527 521 { … … 596 590 { 597 591 HWND hwndFocus = (HWND)mp1; 598 592 599 593 dprintf(("OS2: WM_SETFOCUS %x %x (%x) %d", win32wnd->getWindowHandle(), mp1, OS2ToWin32Handle(hwndFocus), mp2)); 600 594 601 //PM doesn't allow SetFocus calls during WM_SETFOCUS message processing; 595 //PM doesn't allow SetFocus calls during WM_SETFOCUS message processing; 602 596 //must delay this function call 603 597 -
trunk/src/user32/win32wbase.cpp
r5083 r5146 1 /* $Id: win32wbase.cpp,v 1.23 4 2001-02-10 10:31:31sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.235 2001-02-17 14:49:26 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 494 494 return FALSE; 495 495 } 496 if(OSLibWinSetWindowULong(OS2Hwnd, OFFSET_WIN32FLAGS, 0) == FALSE) { 497 dprintf(("WM_CREATE: WinSetWindowULong2 %X failed!!", OS2Hwnd)); 498 SetLastError(ERROR_OUTOFMEMORY); //TODO: Better error 499 return FALSE; 500 } 496 501 497 502 if (HOOK_IsHooked( WH_CBT )) … … 706 711 if (getStyle() & (WS_MINIMIZE | WS_MAXIMIZE)) 707 712 { 708 709 713 RECT newPos; 714 UINT swFlag = (getStyle() & WS_MINIMIZE) ? SW_MINIMIZE : SW_MAXIMIZE; 710 715 setStyle(getStyle() & ~(WS_MAXIMIZE | WS_MINIMIZE)); 711 716 MinMaximize(swFlag, &newPos); 712 717 swFlag = ((getStyle() & WS_CHILD) || GetActiveWindow()) ? SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED 713 718 : SWP_NOZORDER | SWP_FRAMECHANGED; … … 2683 2688 { 2684 2689 if(getParent()) { 2685 return getParent()->getWindowHandle() == hwndParent; 2686 } 2687 else return 0; 2690 if(getParent()->getWindowHandle() == hwndParent) 2691 return TRUE; 2692 2693 return getParent()->IsChild(hwndParent); 2694 } 2695 else return 0; 2688 2696 } 2689 2697 //****************************************************************************** … … 3460 3468 // dprintf2(("Win32BaseWindow::GetWindowFromOS2Handle: not an Odin os2 window %x", hwnd)); 3461 3469 return 0; 3462 }3463 //******************************************************************************3464 //******************************************************************************3465 HWND Win32BaseWindow::getNextDlgTabItem(HWND hwndCtrl, BOOL fPrevious)3466 {3467 Win32BaseWindow *child, *nextchild, *lastchild;3468 HWND retvalue;3469 3470 if (hwndCtrl)3471 {3472 child = GetWindowFromHandle(hwndCtrl);3473 if (!child)3474 {3475 retvalue = 0;3476 goto END;3477 }3478 /* Make sure hwndCtrl is a top-level child */3479 while ((child->getStyle() & WS_CHILD) && (child->getParent() != this))3480 {3481 child = child->getParent();3482 if(child == NULL) break;3483 }3484 3485 if (!child || (child->getParent() != this))3486 {3487 retvalue = 0;3488 goto END;3489 }3490 }3491 else3492 {3493 /* No ctrl specified -> start from the beginning */3494 child = (Win32BaseWindow *)getFirstChild();3495 if (!child)3496 {3497 retvalue = 0;3498 goto END;3499 }3500 3501 if (!fPrevious)3502 {3503 while (child->getNextChild())3504 {3505 child = (Win32BaseWindow *)child->getNextChild();3506 }3507 }3508 }3509 3510 lastchild = child;3511 nextchild = (Win32BaseWindow *)child->getNextChild();3512 while (TRUE)3513 {3514 if (!nextchild) nextchild = (Win32BaseWindow *)getFirstChild();3515 3516 if (child == nextchild) break;3517 3518 if ((nextchild->getStyle() & WS_TABSTOP) && (nextchild->getStyle() & WS_VISIBLE) &&3519 !(nextchild->getStyle() & WS_DISABLED))3520 {3521 lastchild = nextchild;3522 if (!fPrevious) break;3523 }3524 nextchild = (Win32BaseWindow *)nextchild->getNextChild();3525 }3526 retvalue = lastchild->getWindowHandle();3527 3528 END:3529 return retvalue;3530 3470 } 3531 3471 //****************************************************************************** -
trunk/src/user32/win32wbase.h
r5137 r5146 1 /* $Id: win32wbase.h,v 1.10 4 2001-02-15 00:33:01sandervl Exp $ */1 /* $Id: win32wbase.h,v 1.105 2001-02-17 14:49:26 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 27 27 #define OFFSET_WIN32WNDPTR 0 28 28 #define OFFSET_WIN32PM_MAGIC 4 29 #define NROF_WIN32WNDBYTES 8 29 #define OFFSET_WIN32FLAGS 8 30 #define NROF_WIN32WNDBYTES 12 30 31 31 32 #define WIN32PM_MAGIC 0x12345678 … … 291 292 BOOL EnumWindows(WNDENUMPROC lpfn, LPARAM lParam); 292 293 293 HWND getNextDlgTabItem(HWND hwndCtrl, BOOL fPrevious);294 294 HWND getNextDlgGroupItem(HWND hwndCtrl, BOOL fPrevious); 295 295 -
trunk/src/user32/windlg.cpp
r5065 r5146 1 /* $Id: windlg.cpp,v 1.2 0 2001-02-05 18:49:30sandervl Exp $ */1 /* $Id: windlg.cpp,v 1.21 2001-02-17 14:49:26 sandervl Exp $ */ 2 2 /* 3 3 * Win32 dialog apis for OS/2 … … 241 241 return (BOOL)SendDlgItemMessageA(hwnd, id,BM_GETCHECK,0,0); 242 242 } 243 /*********************************************************************** 244 * DIALOG_GetNextTabItem 245 * 246 * Helper for GetNextDlgTabItem 247 */ 248 static HWND DIALOG_GetNextTabItem( HWND hwndMain, HWND hwndDlg, HWND hwndCtrl, BOOL fPrevious ) 249 { 250 LONG dsStyle; 251 LONG exStyle; 252 UINT wndSearch = fPrevious ? GW_HWNDPREV : GW_HWNDNEXT; 253 HWND retWnd = 0; 254 HWND hChildFirst = 0; 255 256 if(!hwndCtrl) 257 { 258 hChildFirst = GetWindow(hwndDlg,GW_CHILD); 259 if(fPrevious) hChildFirst = GetWindow(hChildFirst,GW_HWNDLAST); 260 } 261 else 262 { 263 HWND hParent = GetParent(hwndCtrl); 264 BOOL bValid = FALSE; 265 while( hParent) 266 { 267 if(hParent == hwndMain) 268 { 269 bValid = TRUE; 270 break; 271 } 272 hParent = GetParent(hParent); 273 } 274 if(bValid) 275 { 276 hChildFirst = GetWindow(hwndCtrl,wndSearch); 277 if(!hChildFirst) 278 { 279 if(GetParent(hwndCtrl) != hwndMain) 280 hChildFirst = GetWindow(GetParent(hwndCtrl),wndSearch); 281 else 282 { 283 if(fPrevious) 284 hChildFirst = GetWindow(hwndCtrl,GW_HWNDLAST); 285 else 286 hChildFirst = GetWindow(hwndCtrl,GW_HWNDFIRST); 287 } 288 } 289 } 290 } 291 while(hChildFirst) 292 { 293 BOOL bCtrl = FALSE; 294 while(hChildFirst) 295 { 296 dsStyle = GetWindowLongA(hChildFirst,GWL_STYLE); 297 exStyle = GetWindowLongA(hChildFirst,GWL_EXSTYLE); 298 if( (dsStyle & DS_CONTROL || exStyle & WS_EX_CONTROLPARENT) && (dsStyle & WS_VISIBLE) && !(dsStyle & WS_DISABLED)) 299 { 300 bCtrl=TRUE; 301 break; 302 } 303 else if( (dsStyle & WS_TABSTOP) && (dsStyle & WS_VISIBLE) && !(dsStyle & WS_DISABLED)) 304 break; 305 hChildFirst = GetWindow(hChildFirst,wndSearch); 306 } 307 if(hChildFirst) 308 { 309 if(bCtrl) 310 retWnd = DIALOG_GetNextTabItem(hwndMain,hChildFirst,(HWND)NULL,fPrevious ); 311 else 312 retWnd = hChildFirst; 313 } 314 if(retWnd) break; 315 hChildFirst = GetWindow(hChildFirst,wndSearch); 316 } 317 if(!retWnd && hwndCtrl) 318 { 319 HWND hParent = GetParent(hwndCtrl); 320 while(hParent) 321 { 322 if(hParent == hwndMain) break; 323 retWnd = DIALOG_GetNextTabItem(hwndMain,GetParent(hParent),hParent,fPrevious ); 324 if(retWnd) break; 325 hParent = GetParent(hParent); 326 } 327 if(!retWnd) 328 retWnd = DIALOG_GetNextTabItem(hwndMain,hwndMain,(HWND)NULL,fPrevious ); 329 } 330 return retWnd; 331 } 243 332 //****************************************************************************** 244 333 //****************************************************************************** … … 253 342 return 0; 254 343 } 255 dprintf(("USER32: GetNextDlgTabItem\n"));256 return window->getNextDlgTabItem(hwndCtrl, fPrevious);344 dprintf(("USER32: GetNextDlgTabItem %x %x %d", hwndDlg,hwndCtrl,fPrevious)); 345 return DIALOG_GetNextTabItem(hwndDlg,hwndDlg,hwndCtrl,fPrevious); 257 346 } 258 347 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.