- Timestamp:
- Oct 14, 1999, 8:27:59 PM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/listbox.cpp
r1281 r1297 1 /* $Id: listbox.cpp,v 1. 5 1999-10-14 09:22:39sandervl Exp $ */1 /* $Id: listbox.cpp,v 1.6 1999-10-14 18:27:55 sandervl Exp $ */ 2 2 /* 3 3 * Listbox controls … … 322 322 static void LISTBOX_UpdateSize( HWND hwnd, LB_DESCR *descr ) 323 323 { 324 RECT rect; 325 324 RECT rect, rectWindow; 325 326 GetWindowRect( hwnd, &rectWindow ); 327 OffsetRect(&rectWindow, -rectWindow.left, -rectWindow.top); 326 328 GetClientRect( hwnd, &rect ); 329 327 330 descr->width = rect.right - rect.left; 328 331 descr->height = rect.bottom - rect.top; … … 336 339 descr->height - descr->height%descr->item_height)); 337 340 SetWindowPos( hwnd, 0, 0, 0, 338 descr->width,339 descr->height-341 rectWindow.right - rectWindow.left, 342 rectWindow.bottom - rectWindow.top - 340 343 (descr->height % descr->item_height), 341 344 SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOMOVE ); -
trunk/src/user32/oslibgdi.cpp
r1057 r1297 1 /* $Id: oslibgdi.cpp,v 1. 2 1999-09-26 10:09:59sandervl Exp $ */1 /* $Id: oslibgdi.cpp,v 1.3 1999-10-14 18:27:57 sandervl Exp $ */ 2 2 /* 3 3 * Window GDI wrapper functions for OS/2 … … 74 74 { 75 75 RECTLOS2 rectParent = {0}; 76 Win32BaseWindow *window; 77 LONG height; 76 78 77 79 if(hwndParent == OSLIB_HWND_DESKTOP) { … … 83 85 } 84 86 85 ULONG length = rectOS2->yTop - rectOS2->yBottom; 86 87 rectWin32->bottom = length - rectOS2->yBottom; 88 rectWin32->top = length - rectOS2->yTop; 87 if(hwndParent != HWND_DESKTOP) 88 { 89 window = Win32BaseWindow::GetWindowFromOS2FrameHandle(hwndParent); 90 if(window == NULL) 91 return FALSE; 92 height = window->getWindowHeight(); 93 } 94 else height = OSLibQueryScreenHeight(); 95 96 rectWin32->bottom = height - rectOS2->yBottom; 97 rectWin32->top = height - rectOS2->yTop; 89 98 rectWin32->left = rectOS2->xLeft; 90 99 rectWin32->right = rectOS2->xRight; -
trunk/src/user32/oslibwin.cpp
r1281 r1297 1 /* $Id: oslibwin.cpp,v 1.2 7 1999-10-14 09:22:40sandervl Exp $ */1 /* $Id: oslibwin.cpp,v 1.28 1999-10-14 18:27:57 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 43 43 //****************************************************************************** 44 44 //****************************************************************************** 45 BOOL OSLibWinSetOwner(HWND hwnd, HWND hwndOwner) 46 { 47 return WinSetOwner(hwnd, hwndOwner); 48 } 49 //****************************************************************************** 50 //****************************************************************************** 45 51 HWND OSLibWinCreateWindow(HWND hwndParent, ULONG dwWinStyle, ULONG dwFrameStyle, 46 char *pszName, HWND Owner, ULONG fHWND_BOTTOM, HWND *hwndFrame) 52 char *pszName, HWND Owner, ULONG fHWND_BOTTOM, HWND *hwndFrame, 53 ULONG id) 47 54 { 48 55 HWND hwndClient; … … 73 80 *hwndFrame = WinCreateStdWindow(hwndParent, dwWinStyle, 74 81 &dwFrameStyle, WIN32_STDCLASS, 75 "", dwClientStyle, 0, 0, &hwndClient);82 "", dwClientStyle, 0, id, &hwndClient); 76 83 if(*hwndFrame) { 77 84 if(pszName) { … … 320 327 BOOL OSLibWinShowWindow(HWND hwnd, ULONG fl) 321 328 { 322 BOOL rc ;329 BOOL rc = 1; 323 330 324 331 if(fl & SWP_SHOW) { -
trunk/src/user32/oslibwin.h
r1265 r1297 1 /* $Id: oslibwin.h,v 1.1 5 1999-10-13 14:24:25sandervl Exp $ */1 /* $Id: oslibwin.h,v 1.16 1999-10-14 18:27:57 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 34 34 35 35 BOOL OSLibWinSetParent(HWND hwnd, HWND hwndParent, ULONG fRedraw = TRUE); 36 BOOL OSLibWinSetOwner(HWND hwnd, HWND hwndOwner); 36 37 37 38 38 39 HWND OSLibWinCreateWindow(HWND hwndParent, ULONG dwWinStyle, ULONG dwFrameStyle, 39 char *pszName, HWND Owner, ULONG fHWND_BOTTOM, HWND *hwndFrame); 40 char *pszName, HWND Owner, ULONG fHWND_BOTTOM, 41 HWND *hwndFrame, ULONG id); 40 42 41 43 BOOL OSLibWinConvertStyle(ULONG dwStyle, ULONG *dwExStyle, ULONG *OSWinStyle, ULONG *OSFrameStyle, ULONG *borderWidth, ULONG *borderHeight); -
trunk/src/user32/pmframe.cpp
r1248 r1297 1 /* $Id: pmframe.cpp,v 1. 4 1999-10-11 16:04:51 cbratschiExp $ */1 /* $Id: pmframe.cpp,v 1.5 1999-10-14 18:27:58 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Frame Managment Code for OS/2 … … 177 177 switch(msg) 178 178 { 179 case WM_ADJUSTWINDOWPOS: 180 { 181 PSWP pswp = (PSWP)mp1; 182 Win32BaseWindow *wndchild; 183 184 wndchild = Win32BaseWindow::GetWindowFromOS2FrameHandle(pswp->hwnd); 185 if(wndchild && wndchild->isChild()) { 186 dprintf(("PMFRAME: WM_ADJUSTWINDOWPOS %x %x %x (%d,%d) (%d,%d)", hwnd, pswp->hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 187 RestoreOS2TIB(); 188 return (MRESULT)0; 189 } 190 goto RunDefFrameProc; 191 } 192 #if 0 193 case WM_WINDOWPOSCHANGED: 194 { 195 PSWP pswp = (PSWP)mp1; 196 dprintf(("PMFRAME: WM_WINDOWPOSCHANGED %x %x %x (%d,%d) (%d,%d)", hwnd, pswp->hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 197 goto RunDefFrameProc; 198 } 199 200 case WM_FORMATFRAME: 201 { 202 PSWP pswp = (PSWP)mp1; 203 dprintf(("PMFRAME: WM_FORMATFRAME %x %x %x (%d,%d) (%d,%d)", hwnd, pswp->hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 204 goto RunDefFrameProc; 205 } 206 #endif 207 179 208 case WM_DESTROY: 180 209 #ifdef PMFRAMELOG -
trunk/src/user32/pmwindow.cpp
r1281 r1297 1 /* $Id: pmwindow.cpp,v 1.2 6 1999-10-14 09:22:40sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.27 1999-10-14 18:27:58 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 241 241 242 242 case WM_SHOW: 243 dprintf(("OS2: WM_SHOW %x ", hwnd));243 dprintf(("OS2: WM_SHOW %x %d", hwnd, mp1)); 244 244 if(win32wnd->MsgShow((ULONG)mp1)) { 245 245 goto RunDefWndProc; … … 306 306 dprintf(("WINDOWPOSCHANGE %x %x %x (%d,%d) (%d,%d)", win32wnd->getWindowHandle(), win32wnd->getOS2FrameWindowHandle(), 307 307 swpFrame.fl,swpFrame.x, swpFrame.y, swpFrame.cx, swpFrame.cy)); 308 309 RECTL rect;310 WinQueryWindowRect(win32wnd->getOS2FrameWindowHandle(), &rect);311 dprintf(("WINDOWPOSCHANGE %x %x (%d,%d) (%d,%d)", win32wnd->getWindowHandle(), win32wnd->getOS2FrameWindowHandle(),312 rect.xLeft, rect.yBottom, rect.xRight, rect.yTop));313 314 win32wnd->setWindowRect( wp.x, wp.y, wp.x + wp.cx, wp.y + wp.cy);308 POINTL point; 309 point.x = swpFrame.x; 310 point.y = swpFrame.y; 311 WinMapWindowPoints(win32wnd->getOS2FrameWindowHandle(), HWND_DESKTOP, 312 &point, 1); 313 314 win32wnd->setWindowRect(point.x, point.y, point.x+swpFrame.cx, point.y+swpFrame.cy); 315 315 win32wnd->setClientRect(pswpo->x, pswpo->y, pswpo->x + pswpo->cx, pswpo->y + pswpo->cy); 316 316 … … 342 342 #ifdef DEBUG 343 343 Win32BaseWindow *window = Win32BaseWindow::GetWindowFromOS2Handle(hwnd); 344 dprintf(("ENUMERATE %x delta %d (%d,%d) (%d,%d) ", (window) ? window->getWindowHandle() : hwnd,345 yDelta, swp[i].x, swp[i].y, swp[i].cx, swp[i].cy ));344 dprintf(("ENUMERATE %x delta %d (%d,%d) (%d,%d) %x", (window) ? window->getWindowHandle() : hwnd, 345 yDelta, swp[i].x, swp[i].y, swp[i].cx, swp[i].cy, swp[i].fl)); 346 346 #endif 347 347 … … 349 349 //child window at offset <> 0 from client area -> offset now changes 350 350 swp[i].y += yDelta; 351 swp[i].fl &= ~ SWP_NOREDRAW;351 swp[i].fl &= ~(SWP_NOREDRAW); 352 352 } 353 353 //else child window with the same start coorindates as the client area … … 387 387 case WM_ERASEBACKGROUND: 388 388 { 389 dprintf(("OS2: WM_ERASEBACKGROUND %x", win32wnd->getWindowHandle())); 389 390 if (!win32wnd->isSupressErase()) { 390 391 BOOL erased = sendEraseBkgnd (win32wnd); -
trunk/src/user32/win32wbase.cpp
r1281 r1297 1 /* $Id: win32wbase.cpp,v 1.4 1 1999-10-14 09:22:42sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.42 1999-10-14 18:27:59 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 454 454 dwExStyle = cs->dwExStyle; 455 455 456 //SvL: Add bordersize457 cs->cy += 2*borderHeight;458 cs->cx += 2*borderWidth;459 460 456 rectWindow.left = cs->x; 461 457 rectWindow.top = cs->y; … … 489 485 (owner) ? owner->getOS2WindowHandle() : OSLIB_HWND_DESKTOP, 490 486 (hwndLinkAfter == HWND_BOTTOM) ? TRUE : FALSE, 491 &OS2HwndFrame );487 &OS2HwndFrame, 0); 492 488 493 489 if(OS2Hwnd == 0) { … … 548 544 #endif 549 545 546 OSLibWinSetOwner(OS2Hwnd, OS2HwndFrame); 547 550 548 if (dwStyle & WS_HSCROLL) 551 549 { … … 585 583 586 584 //Subclass frame 587 if(isFrameWindow() && (HAS_3DFRAME(dwExStyle) ||588 (!HAS_DLGFRAME(dwStyle, dwExStyle) && (dwStyle & (WS_DLGFRAME|WS_BORDER|WS_THICKFRAME)) == WS_BORDER)))589 {585 // if(isFrameWindow() && (HAS_3DFRAME(dwExStyle) || 586 // (!HAS_DLGFRAME(dwStyle, dwExStyle) && (dwStyle & (WS_DLGFRAME|WS_BORDER|WS_THICKFRAME)) == WS_BORDER))) 587 // { 590 588 pOldFrameProc = FrameSubclassFrameWindow(this); 591 589 if (isChild()) FrameSetBorderSize(this,TRUE); 592 }590 // } 593 591 594 592 /* Send the WM_CREATE message … … 617 615 SendNCCalcSize(FALSE, &rectWindow, NULL, NULL, 0, &rectClient ); 618 616 619 OffsetRect(&rectWindow, maxPos.x - rectWindow.left, maxPos.y - rectWindow.top);617 // OffsetRect(&rectWindow, maxPos.x - rectWindow.left, maxPos.y - rectWindow.top); 620 618 dprintf(("Sending WM_CREATE")); 621 619 if( (SendMessageA(WM_CREATE, 0, (LPARAM)cs )) != -1 ) … … 686 684 ULONG Win32BaseWindow::MsgShow(BOOL fShow) 687 685 { 686 if(fNoSizeMsg) { 687 return 1; 688 } 689 690 if(fShow) { 691 setStyle(getStyle() | WS_VISIBLE); 692 } 693 else setStyle(getStyle() & ~WS_VISIBLE); 694 688 695 return SendInternalMessageA(WM_SHOWWINDOW, fShow, 0); 689 696 } … … 692 699 ULONG Win32BaseWindow::MsgPosChanging(LPARAM lp) 693 700 { 694 dprintf(("MsgPosChanging"));695 701 if(fNoSizeMsg) 696 702 return 1; … … 702 708 ULONG Win32BaseWindow::MsgPosChanged(LPARAM lp) 703 709 { 704 dprintf(("MsgPosChanged"));705 710 if(fNoSizeMsg) 706 711 return 1; … … 1969 1974 HWND hParent = 0; 1970 1975 1971 dprintf (("SetWindowPos %x %x (%d,%d)(%d,%d) %x", Win32Hwnd, hwndInsertAfter, x, y, cx, cy, fuFlags));1972 1973 if (fuFlags &1976 dprintf (("SetWindowPos %x %x (%d,%d)(%d,%d) %x", Win32Hwnd, hwndInsertAfter, x, y, cx, cy, fuFlags)); 1977 1978 if (fuFlags & 1974 1979 ~(SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | 1975 1980 SWP_NOREDRAW | SWP_NOACTIVATE | SWP_FRAMECHANGED | 1976 1981 SWP_SHOWWINDOW | SWP_HIDEWINDOW | SWP_NOCOPYBITS | 1977 1982 SWP_NOOWNERZORDER)) 1978 { 1979 return FALSE; 1980 } 1981 1982 WINDOWPOS wpos; 1983 SWP swp, swpOld; 1984 1985 wpos.flags = fuFlags; 1986 wpos.cy = cy; 1987 wpos.cx = cx; 1988 wpos.x = x; 1989 wpos.y = y; 1990 wpos.hwndInsertAfter = hwndInsertAfter; 1991 wpos.hwnd = getWindowHandle(); 1992 1993 //SvL: Add bordersize 1994 wpos.cy += 2*borderHeight; 1995 wpos.cx += 2*borderWidth; 1996 1997 if(~fuFlags & (SWP_NOMOVE | SWP_NOSIZE)) 1998 { 1983 { 1984 return FALSE; 1985 } 1986 1987 WINDOWPOS wpos; 1988 SWP swp, swpOld; 1989 1990 wpos.flags = fuFlags; 1991 wpos.cy = cy; 1992 wpos.cx = cx; 1993 wpos.x = x; 1994 wpos.y = y; 1995 wpos.hwndInsertAfter = hwndInsertAfter; 1996 wpos.hwnd = getWindowHandle(); 1997 1998 if(~fuFlags & (SWP_NOMOVE | SWP_NOSIZE)) 1999 { 1999 2000 if (isChild()) 2000 2001 { … … 2002 2003 } 2003 2004 OSLibWinQueryWindowPos(OS2HwndFrame, &swpOld); 2004 }2005 2006 OSLibMapWINDOWPOStoSWP(&wpos, &swp, &swpOld, hParent, OS2HwndFrame);2007 if (swp.fl == 0)2005 } 2006 2007 OSLibMapWINDOWPOStoSWP(&wpos, &swp, &swpOld, hParent, OS2HwndFrame); 2008 if (swp.fl == 0) 2008 2009 return TRUE; 2009 2010 2010 2011 // if ((swp.fl & SWPOS_ZORDER) && (swp.hwndInsertBehind > HWNDOS_BOTTOM)) 2011 if ((swp.hwndInsertBehind > HWNDOS_BOTTOM))2012 {2012 if ((swp.hwndInsertBehind > HWNDOS_BOTTOM)) 2013 { 2013 2014 Win32BaseWindow *wndBehind = Win32BaseWindow::GetWindowFromHandle(swp.hwndInsertBehind); 2014 2015 if(wndBehind) { … … 2019 2020 swp.hwndInsertBehind = 0; 2020 2021 } 2021 }2022 } 2022 2023 #if 0 2023 if (isFrameWindow())2024 {2024 if (isFrameWindow()) 2025 { 2025 2026 if (!isChild()) 2026 2027 { … … 2035 2036 } 2036 2037 swp.hwnd = OS2HwndFrame; 2037 }2038 else2038 } 2039 else 2039 2040 #endif 2040 2041 swp.hwnd = OS2HwndFrame; 2041 2042 2042 dprintf (("WinSetWindowPos %x %x (%d,%d)(%d,%d) %x", swp.hwnd, swp.hwndInsertBehind, swp.x, swp.y, swp.cx, swp.cy, swp.fl));2043 2044 rc = OSLibWinSetMultWindowPos(&swp, 1);2045 2046 if (rc == FALSE)2047 {2043 dprintf (("WinSetWindowPos %x %x (%d,%d)(%d,%d) %x", swp.hwnd, swp.hwndInsertBehind, swp.x, swp.y, swp.cx, swp.cy, swp.fl)); 2044 2045 rc = OSLibWinSetMultWindowPos(&swp, 1); 2046 2047 if (rc == FALSE) 2048 { 2048 2049 dprintf(("OSLibWinSetMultWindowPos failed!")); 2049 }2050 else2051 {2052 if (fuFlags & SWP_FRAMECHANGED_W)2053 OSLibSendMessage (OS2HwndFrame, 0x42 /*WM_UPDATEFRAME*/, -1, 0);2054 }2055 2056 return (rc);2050 } 2051 else 2052 { 2053 if (fuFlags & SWP_FRAMECHANGED_W) 2054 OSLibSendMessage (OS2HwndFrame, 0x42 /*WM_UPDATEFRAME*/, -1, 0); 2055 } 2056 2057 return (rc); 2057 2058 } 2058 2059 //****************************************************************************** … … 2061 2062 BOOL Win32BaseWindow::DestroyWindow() 2062 2063 { 2063 return OSLibWinDestroyWindow(OS2HwndFrame);2064 return OSLibWinDestroyWindow(OS2HwndFrame); 2064 2065 } 2065 2066 //****************************************************************************** … … 2349 2350 BOOL Win32BaseWindow::GetWindowRect(PRECT pRect) 2350 2351 { 2351 return OSLibWinQueryWindowRect(OS2Hwnd , pRect, RELATIVE_TO_SCREEN);2352 return OSLibWinQueryWindowRect(OS2HwndFrame, pRect, RELATIVE_TO_SCREEN); 2352 2353 } 2353 2354 //****************************************************************************** -
trunk/src/user32/window.cpp
r1256 r1297 1 /* $Id: window.cpp,v 1.1 4 1999-10-12 14:47:24sandervl Exp $ */1 /* $Id: window.cpp,v 1.15 1999-10-14 18:27:59 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 617 617 BOOL WIN32API GetWindowRect( HWND hwnd, PRECT pRect) 618 618 { 619 Win32BaseWindow *window; 619 Win32BaseWindow *window; 620 BOOL rc; 620 621 621 622 window = Win32BaseWindow::GetWindowFromHandle(hwnd); … … 625 626 return 0; 626 627 } 627 dprintf(("GetWindowRect %x", hwnd)); 628 return window->GetWindowRect(pRect); 628 rc = window->GetWindowRect(pRect); 629 dprintf(("GetWindowRect %x (%d,%d) (%d,%d)", hwnd, pRect->left, pRect->top, pRect->right, pRect->bottom)); 630 return rc; 629 631 } 630 632 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.