- Timestamp:
- Oct 21, 1999, 2:19:29 PM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/combo.cpp
r1387 r1391 1 /* $Id: combo.cpp,v 1. 7 1999-10-20 22:35:52sandervl Exp $ */1 /* $Id: combo.cpp,v 1.8 1999-10-21 12:19:26 sandervl Exp $ */ 2 2 /* 3 3 * Combo controls … … 165 165 { 166 166 RECT windowRect; 167 168 //SvL: Doesn't work for us 169 return; 167 170 168 171 GetWindowRect(CB_HWND(lphc), &windowRect); … … 181 184 windowRect.right - windowRect.left, 182 185 windowRect.bottom - windowRect.top + 183 186 lphc->droppedRect.bottom - lphc->droppedRect.top, 184 187 SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE ); 185 188 } … … 431 434 WINDOWPOS* posChanging) 432 435 { 436 dprintf(("COMBO_WindowPosChanging")); 437 433 438 /* 434 439 * We need to override the WM_WINDOWPOSCHANGING method to handle all … … 474 479 LPCREATESTRUCTA lpcs = (CREATESTRUCTA*)lParam; 475 480 476 //testestest477 #if 1478 lphc->dwStyle |= CBS_SIMPLE;479 #else480 481 if( !CB_GETTYPE(lphc) ) lphc->dwStyle |= CBS_SIMPLE; 481 482 else if( CB_GETTYPE(lphc) != CBS_DROPDOWNLIST ) lphc->wState |= CBF_EDIT; 482 #endif483 483 484 484 lphc->hwndself = hwnd; -
trunk/src/user32/oslibwin.cpp
r1376 r1391 1 /* $Id: oslibwin.cpp,v 1.3 2 1999-10-20 13:46:26 sandervl Exp $ */1 /* $Id: oslibwin.cpp,v 1.33 1999-10-21 12:19:26 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 486 486 HWND hWinAfter; 487 487 ULONG flags = 0; 488 SWP swpFrame ;488 SWP swpFrame, swpClient; 489 489 POINTL point; 490 490 … … 508 508 if ( fuFlags & SWP_SHOW) flags |= SWP_SHOWWINDOW_W; 509 509 if ( fuFlags & SWP_HIDE) flags |= SWP_HIDEWINDOW_W; 510 if ( fuFlags & SWP_NOADJUST) flags |= SWP_NOSENDCHANGING_W; 510 511 511 512 WinQueryWindowPos(hFrame, &swpFrame); 513 514 if ( fuFlags & SWP_NOADJUST) { 515 WinQueryWindowPos(WinWindowFromID(hFrame, FID_CLIENT), &swpClient); 516 x = swpClient.x; 517 cx = swpClient.cx; 518 y = swpClient.y; 519 cy = swpClient.cy; 520 } 512 521 513 522 if(fuFlags & (SWP_MOVE | SWP_SIZE)) … … 596 605 if ( fuFlags & SWP_SHOWWINDOW_W) flags |= SWP_SHOW; 597 606 if ( fuFlags & SWP_HIDEWINDOW_W) flags |= SWP_HIDE; 607 if ( fuFlags & SWP_NOSENDCHANGING_W) flags |= SWP_NOADJUST; 598 608 599 609 if (flags & (SWP_MOVE | SWP_SIZE)) -
trunk/src/user32/pmwindow.cpp
r1387 r1391 1 /* $Id: pmwindow.cpp,v 1.3 8 1999-10-20 22:35:53sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.39 1999-10-21 12:19:27 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 253 253 WINDOWPOS wp; 254 254 ULONG parentHeight = 0; 255 HWND hParent = NULLHANDLE, hFrame = NULLHANDLE ;255 HWND hParent = NULLHANDLE, hFrame = NULLHANDLE, hwndAfter; 256 256 257 257 dprintf(("OS2: WM_ADJUSTWINDOWPOS %x %x %x (%d,%d) (%d,%d)", hwnd, pswp->hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 258 258 259 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) break; 260 if(!win32wnd->CanReceiveSizeMsgs()) break; 259 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) goto RunDefWndProc;; 260 261 //SvL: TODO: Workaround. Why is this happening? 262 // When this flag is set the coordinates are 0, even though SWP_SIZE & SWP_MOVE are set. 263 // if ((pswp->fl & SWP_NOADJUST)) goto RunDefWndProc; 264 265 if(!win32wnd->CanReceiveSizeMsgs()) goto RunDefWndProc;; 261 266 262 267 WinQueryWindowPos(hwnd, &swpOld); … … 267 272 hParent = win32wnd->getParent()->getOS2WindowHandle(); 268 273 } 269 else break; 270 } 271 } 274 else goto RunDefWndProc;; 275 } 276 } 277 hwndAfter = pswp->hwndInsertBehind; 272 278 hFrame = win32wnd->getOS2FrameWindowHandle(); 273 279 OSLibMapSWPtoWINDOWPOS(pswp, &wp, &swpOld, hParent, hFrame); … … 285 291 OSLibMapWINDOWPOStoSWP(&wp, pswp, &swpOld, hParent, hFrame); 286 292 dprintf(("%x (%d,%d), (%d,%d)", pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 287 //TODO: What should we return here? 0 means no changes, but the AWP flags 288 // aren't very useful either 293 pswp->fl |= SWP_NOADJUST; 294 pswp->hwndInsertBehind = hwndAfter; 295 pswp->hwnd = hFrame; 296 297 WinSetMultWindowPos(GetThreadHAB(), pswp, 1); 298 return (MRESULT)0; 289 299 } 290 300 break; … … 301 311 LONG xDelta = pswp->cx - swpOld.cx; 302 312 303 dprintf(("OS2: WM_WINDOWPOSCHANGED %x %x (%d,%d) (%d,%d)", hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy));313 dprintf(("OS2: WM_WINDOWPOSCHANGED (%x) %x %x (%d,%d) (%d,%d)", mp2, hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 304 314 305 315 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) break; … … 314 324 } 315 325 } 316 hFrame = WinQueryWindow(hwnd, QW_PARENT); 317 OSLibMapSWPtoWINDOWPOS(pswp, &wp, &swpOld, hParent, hFrame); 326 OSLibMapSWPtoWINDOWPOS(pswp, &wp, &swpOld, hParent, hwnd); 318 327 319 328 win32wnd->setWindowRect(wp.x, wp.y, wp.x+wp.cx, wp.y+wp.cy); … … 388 397 } 389 398 390 case WM_MOVE:391 {392 if (!win32wnd->isFrameWindow()) break;393 394 HWND hFrame = win32wnd->getOS2FrameWindowHandle();395 SWP swp, swpo;396 WINDOWPOS wp;397 ULONG parentHeight = 0;398 RECTL rcl;399 400 WinQueryWindowRect (hwnd, &rcl);401 WinMapWindowPoints (hwnd, hFrame, (PPOINTL)&rcl, 2);402 swp.x = swpo.x = rcl.xLeft;403 swp.y = swpo.y = rcl.yBottom;404 swp.cx = swpo.cx = rcl.xRight - rcl.xLeft;405 swp.cy = swpo.cy = rcl.yTop - rcl.yBottom;406 swp.fl = SWP_MOVE | SWP_NOREDRAW;407 swp.hwnd = hwnd;408 swp.hwndInsertBehind = NULLHANDLE;409 dprintf(("OS2: WM_MOVE %x %x (%d,%d) (%d,%d)", hwnd, swp.fl, swp.x, swp.y, swp.cx, swp.cy));410 411 OSLibMapSWPtoWINDOWPOS(&swp, &wp, &swpo, NULLHANDLE, hFrame);412 413 wp.flags &= ~SWP_NOMOVE_W;414 wp.hwnd = win32wnd->getWindowHandle();415 win32wnd->setWindowRect(wp.x, wp.y, wp.x + wp.cx, wp.y + wp.cy);416 win32wnd->setClientRect(swpo.x, swpo.y, swpo.x + swpo.cx, swpo.y + swpo.cy);417 win32wnd->MsgPosChanged((LPARAM)&wp);418 break;419 }420 421 399 case WM_SIZE: 422 400 { 423 break; 401 dprintf(("OS2: WM_SIZE (%d,%d) (%d,%d)", SHORT1FROMMP(mp2), SHORT2FROMMP(mp2), SHORT1FROMMP(mp1), SHORT2FROMMP(mp2))); 402 break; 403 } 404 405 case WM_OWNERPOSCHANGE: 406 { 407 dprintf(("OS2: WM_OWNERPOSCHANGE")); 408 goto RunDefWndProc; 409 } 410 411 case WM_CALCVALIDRECTS: 412 { 413 dprintf(("OS2: WM_CALCVALIDRECTS")); 414 goto RunDefWndProc; 424 415 } 425 416 … … 820 811 win32wnd->setEraseBkgnd (!erased, !erased); 821 812 } 822 823 813 break; 824 814 } … … 853 843 case WM_SYSCOLORCHANGE: 854 844 case WM_SYSVALUECHANGED: 855 case WM_CALCVALIDRECTS:856 845 case WM_SETSELECTION: 857 846 case WM_PPAINT: -
trunk/src/user32/win32dlg.cpp
r1346 r1391 1 /* $Id: win32dlg.cpp,v 1.1 8 1999-10-17 20:18:45sandervl Exp $ */1 /* $Id: win32dlg.cpp,v 1.19 1999-10-21 12:19:27 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Dialog Code for OS/2 … … 20 20 #include "oslibmsg.h" 21 21 #include "win32wdesktop.h" 22 #include "controls.h" 22 23 23 24 #define DEFAULT_DLGFONT "9.WarpSans" … … 770 771 if (hwndCurFocus) 771 772 { 772 #if 0 773 WND *wnd = WIN_FindWndPtr( hwndFocus ); 774 775 if( wnd ) 773 Win32BaseWindow *wndFocus = Win32BaseWindow::GetWindowFromHandle(hwndFocus); 774 775 if(wndFocus) 776 776 { 777 777 /* always make combo box hide its listbox control */ 778 if( WIDGETS_IsControl( wnd , BIC32_COMBO) )779 SendMessageA( hwndFocus,CB_SHOWDROPDOWN, FALSE, 0 );778 if( WIDGETS_IsControl( wndFocus, COMBOBOX_CONTROL ) ) 779 wndFocus->SendMessageA(CB_SHOWDROPDOWN, FALSE, 0 ); 780 780 else 781 if( WIDGETS_IsControl( wnd , BIC32_EDIT) &&782 WIDGETS_IsControl( wnd ->parent, BIC32_COMBO))783 SendMessageA(CB_SHOWDROPDOWN, FALSE, 0 );781 if( WIDGETS_IsControl( wndFocus, EDIT_CONTROL ) && 782 WIDGETS_IsControl( wndFocus->getParent(), COMBOBOX_CONTROL )) 783 wndFocus->SendMessageA(CB_SHOWDROPDOWN, FALSE, 0 ); 784 784 } 785 #endif786 785 } 787 786 return DefWindowProcA( msg, wParam, lParam ); -
trunk/src/user32/win32wbase.cpp
r1376 r1391 1 /* $Id: win32wbase.cpp,v 1.5 7 1999-10-20 13:46:27sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.58 1999-10-21 12:19:28 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 675 675 676 676 // OffsetRect(&rectWindow, maxPos.x - rectWindow.left, maxPos.y - rectWindow.top); 677 dprintf(("Sending WM_CREATE"));678 677 if( (SendMessageA(WM_CREATE, 0, (LPARAM)cs )) != -1 ) 679 678 { -
trunk/src/user32/win32wbasepos.cpp
r1376 r1391 1 /* $Id: win32wbasepos.cpp,v 1. 4 1999-10-20 13:46:28sandervl Exp $ */1 /* $Id: win32wbasepos.cpp,v 1.5 1999-10-21 12:19:29 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 (nonclient/position methods) … … 426 426 { 427 427 POINT maxSize, minTrack; 428 int rc = 1; 428 429 429 430 if (winpos->flags & SWP_NOSIZE) … … 431 432 432 433 if ((getStyle() & WS_THICKFRAME) || 433 ((getStyle() & (WS_POPUP | WS_CHILD)) == 0)) 434 { 435 GetMinMaxInfo(&maxSize, NULL, &minTrack, NULL ); 436 if (maxSize.x < winpos->cx) winpos->cx = maxSize.x; 437 if (maxSize.y < winpos->cy) winpos->cy = maxSize.y; 438 if (!(getStyle() & WS_MINIMIZE)) 439 { 440 if (winpos->cx < minTrack.x ) winpos->cx = minTrack.x; 441 if (winpos->cy < minTrack.y ) winpos->cy = minTrack.y; 442 } 443 return 0; 434 ((getStyle() & (WS_POPUP | WS_CHILD)) == 0)) 435 { 436 GetMinMaxInfo(&maxSize, NULL, &minTrack, NULL ); 437 if (maxSize.x < winpos->cx) { 438 winpos->cx = maxSize.x; 439 rc = 0; 440 } 441 if (maxSize.y < winpos->cy) { 442 winpos->cy = maxSize.y; 443 rc = 0; 444 } 445 if (!(getStyle() & WS_MINIMIZE)) 446 { 447 if (winpos->cx < minTrack.x ) { 448 winpos->cx = minTrack.x; 449 rc = 0; 450 } 451 if (winpos->cy < minTrack.y ) { 452 winpos->cy = minTrack.y; 453 rc = 0; 454 } 455 } 444 456 } 445 return 1;457 return rc; 446 458 } 447 459 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.