- Timestamp:
- Jan 13, 2000, 9:11:39 PM (26 years ago)
- Location:
- trunk/src/user32/new
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/dc.cpp
r2421 r2433 1 /* $Id: dc.cpp,v 1.1 1 2000-01-12 17:37:28 cbratschiExp $ */1 /* $Id: dc.cpp,v 1.12 2000-01-13 20:11:36 sandervl Exp $ */ 2 2 3 3 /* … … 679 679 // isWindowOwnDC = (((hWindow == HWND_DESKTOP) ? FALSE : (wnd->isOwnDC() && wnd->getOwnDC())) 680 680 isWindowOwnDC = (((hWindow == HWND_DESKTOP) ? FALSE : (wnd->isOwnDC())) 681 && !(flags & DCX_CACHE_W ));681 && !(flags & DCX_CACHE_W|DCX_WINDOW_W)); 682 682 683 683 if (isWindowOwnDC) … … 814 814 //SvL: Hack for memory.exe (doesn't get repainted properly otherwise) 815 815 // isOwnDC = wnd->isOwnDC() && wnd->getOwnDC(); 816 isOwnDC = wnd->isOwnDC() ;816 isOwnDC = wnd->isOwnDC() && (wnd->getOwnDC() == hdc); 817 817 } 818 818 if (isOwnDC) … … 839 839 #endif 840 840 841 #if 1842 841 WinUpdateWindow(wnd->getOS2FrameWindowHandle()); 843 #else844 wnd->MsgPaint(0);845 #endif846 842 847 843 return (TRUE); … … 1271 1267 dprintf(("ScrollWindow %x %d %d %x %x", hwnd, dx, dy, pScroll, pClip)); 1272 1268 mapWin32ToOS2Rect(window,window->getClientRectPtr(),(PRECTLOS2)&clientRect); 1269 #if 0 1273 1270 //Rectangle could be relative to parent window, so fix this 1274 1271 if(clientRect.yBottom != 0) { … … 1280 1277 clientRect.xLeft = 0; 1281 1278 } 1279 #endif 1282 1280 if(pScroll) { 1283 1281 mapWin32ToOS2Rect(window,(RECT *)pScroll, (PRECTLOS2)&scrollRect); -
trunk/src/user32/new/menu.cpp
r2415 r2433 1 /* $Id: menu.cpp,v 1. 8 2000-01-12 12:40:43sandervl Exp $*/1 /* $Id: menu.cpp,v 1.9 2000-01-13 20:11:36 sandervl Exp $*/ 2 2 /* 3 3 * Menu functions … … 3121 3121 DWORD ret; 3122 3122 3123 dprintf(("USER32: CheckMenuItem "));3123 dprintf(("USER32: CheckMenuItem %x %x %x", hMenu, id, flags)); 3124 3124 3125 3125 //TRACE("menu=%04x id=%04x flags=%04x\n", hMenu, id, flags ); … … 3141 3141 POPUPMENU *menu; 3142 3142 3143 dprintf(("USER32: EnableMenuItem "));3143 dprintf(("USER32: EnableMenuItem %x %x %x", hMenu, wItemID, wFlags)); 3144 3144 3145 3145 //TRACE("(%04x, %04X, %04X) !\n", … … 3310 3310 MENUITEM *item; 3311 3311 3312 dprintf(("USER32: InsertMenuA")); 3313 3314 //if (IS_STRING_ITEM(flags) && str) 3312 if (IS_STRING_ITEM(flags) && str) 3313 dprintf(("USER32: InsertMenuA %x %d %x %d %s", hMenu, pos, flags, id, str)); 3315 3314 // TRACE("hMenu %04x, pos %d, flags %08x, " 3316 3315 // "id %04x, str '%s'\n", 3317 3316 // hMenu, pos, flags, id, str ); 3318 //else TRACE("hMenu %04x, pos %d, flags %08x, " 3317 else // TRACE("hMenu %04x, pos %d, flags %08x, " 3318 dprintf(("USER32: InsertMenuA %x %d %x %d %x", hMenu, pos, flags, id, str)); 3319 3319 // "id %04x, str %08lx (not a string)\n", 3320 3320 // hMenu, pos, flags, id, (DWORD)str ); … … 3343 3343 { 3344 3344 BOOL ret; 3345 3346 dprintf(("USER32: InsertMenuW"));3347 3345 3348 3346 if (IS_STRING_ITEM(flags) && str) … … 3375 3373 UINT id, LPCWSTR data ) 3376 3374 { 3377 dprintf(("USER32: AppendMenuW "));3375 dprintf(("USER32: AppendMenuW %x %x %d %x", hMenu, flags, id, data)); 3378 3376 3379 3377 return InsertMenuW( hMenu, -1, flags | MF_BYPOSITION, id, data ); … … 3389 3387 MENUITEM *item; 3390 3388 3391 dprintf(("USER32: RemoveMenu "));3389 dprintf(("USER32: RemoveMenu %x %d %x", hMenu, nPos, wFlags)); 3392 3390 3393 3391 //TRACE("(menu=%04x pos=%04x flags=%04x)\n",hMenu, nPos, wFlags); … … 3426 3424 MENUITEM *item = MENU_FindItem( &hMenu, &nPos, wFlags ); 3427 3425 3428 dprintf(("USER32: DeleteMenu "));3426 dprintf(("USER32: DeleteMenu %x %d %x", hMenu, nPos, wFlags)); 3429 3427 3430 3428 if (!item) return FALSE; … … 3444 3442 MENUITEM *item; 3445 3443 3446 dprintf(("USER32: ModifyMenuA"));3447 3444 3448 3445 if (IS_STRING_ITEM(flags)) 3449 3446 { 3447 dprintf(("USER32: ModifyMenuA, %x %d %x %d %s", hMenu, pos, flags, id, str)); 3450 3448 //TRACE("%04x %d %04x %04x '%s'\n", 3451 3449 // hMenu, pos, flags, id, str ? str : "#NULL#" ); … … 3454 3452 else 3455 3453 { 3454 dprintf(("USER32: ModifyMenuA, %x %d %x %d %x", hMenu, pos, flags, id, str)); 3456 3455 //TRACE("%04x %d %04x %04x %08lx\n", 3457 3456 // hMenu, pos, flags, id, (DWORD)str ); … … 3470 3469 { 3471 3470 BOOL ret; 3472 3473 dprintf(("USER32: ModifyMenuW"));3474 3471 3475 3472 if (IS_STRING_ITEM(flags) && str) … … 3516 3513 * SetMenuItemBitmaps32 (USER32.490) 3517 3514 */ 3518 BOOL WINAPI SetMenuItemBitmaps( 3519 3515 BOOL WINAPI SetMenuItemBitmaps(HMENU hMenu, UINT nPos, UINT wFlags, 3516 HBITMAP hNewUnCheck, HBITMAP hNewCheck) 3520 3517 { 3521 3518 MENUITEM *item; 3522 3519 3523 dprintf(("USER32: SetMenuItemBitmaps "));3520 dprintf(("USER32: SetMenuItemBitmaps %x %d %x %x %x", hMenu, nPos, wFlags, hNewCheck, hNewUnCheck)); 3524 3521 3525 3522 //TRACE("(%04x, %04x, %04x, %04x, %04x)\n", … … 3572 3569 //TRACE("(%04x)\n", hMenu); 3573 3570 3574 dprintf(("USER32: DestroyMenu "));3571 dprintf(("USER32: DestroyMenu %x", hMenu)); 3575 3572 3576 3573 /* Silently ignore attempts to destroy default system popup */ … … 3701 3698 HMENU retvalue; 3702 3699 3703 dprintf(("USER32: GetMenu "));3700 dprintf(("USER32: GetMenu %x", hWnd)); 3704 3701 3705 3702 if (GetWindowLongA(hWnd,GWL_STYLE) & WS_CHILD) return 0; … … 3714 3711 //TRACE("(%04x, %04x);\n", hWnd, hMenu); 3715 3712 3716 dprintf(("USER32: SetMenu "));3713 dprintf(("USER32: SetMenu %x %x", hWnd, hMenu)); 3717 3714 3718 3715 if (hMenu && !IsMenu(hMenu)) … … 3756 3753 MENUITEM * lpmi; 3757 3754 3758 dprintf(("USER32: GetSubMenu "));3755 dprintf(("USER32: GetSubMenu %x %d", nPos)); 3759 3756 3760 3757 if (!(lpmi = MENU_FindItem(&hMenu,(UINT*)&nPos,MF_BYPOSITION))) return 0; … … 3771 3768 LPPOPUPMENU lppop; 3772 3769 3773 dprintf(("USER32: DrawMenuBar "));3770 dprintf(("USER32: DrawMenuBar %x", hWnd)); 3774 3771 3775 3772 if (!(GetWindowLongA(hWnd,GWL_STYLE) & WS_CHILD) && getMenu(hWnd)) … … 3812 3809 HRSRC hrsrc = FindResourceA( instance, name, RT_MENUA ); 3813 3810 3814 dprintf(("USER32: LoadMenuA "));3811 dprintf(("USER32: LoadMenuA %x %x", instance, name)); 3815 3812 3816 3813 if (!hrsrc) return 0; … … 3826 3823 HRSRC hrsrc = FindResourceW( instance, name, RT_MENUW ); 3827 3824 3828 dprintf(("USER32: LoadMenuW "));3825 dprintf(("USER32: LoadMenuW %x %x", instance, name)); 3829 3826 3830 3827 if (!hrsrc) return 0; -
trunk/src/user32/new/pmframe.cpp
r2426 r2433 1 /* $Id: pmframe.cpp,v 1.1 5 2000-01-13 13:54:52sandervl Exp $ */1 /* $Id: pmframe.cpp,v 1.16 2000-01-13 20:11:37 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Frame Managment Code for OS/2 … … 287 287 288 288 //CB: todo: use result for WM_CALCVALIDRECTS 289 mapWin32ToOS2Rect(WinQueryWindow(hwnd,QW_PARENT),hwnd,win32wnd->getClientRectPtr(),(PRECTLOS2)&rect); 289 // mapWin32ToOS2Rect(WinQueryWindow(hwnd,QW_PARENT),hwnd,win32wnd->getClientRectPtr(),(PRECTLOS2)&rect); 290 mapWin32ToOS2Rect(win32wnd->getOS2FrameWindowHandle(), win32wnd->getClientRectPtr(), (PRECTLOS2)&rect); 290 291 291 292 swpClient.hwnd = win32wnd->getOS2WindowHandle(); … … 451 452 win32wnd->MsgFormatFrame(NULL); 452 453 //CB: todo: use result for WM_CALCVALIDRECTS 453 mapWin32ToOS2Rect(WinQueryWindow(win32wnd->getOS2FrameWindowHandle(),QW_PARENT),win32wnd->getOS2FrameWindowHandle(),win32wnd->getClientRectPtr(),(PRECTLOS2)&rect); 454 // mapWin32ToOS2Rect(WinQueryWindow(win32wnd->getOS2FrameWindowHandle(),QW_PARENT),win32wnd->getOS2FrameWindowHandle(),win32wnd->getClientRectPtr(),(PRECTLOS2)&rect); 455 mapWin32ToOS2Rect(win32wnd->getOS2FrameWindowHandle(), win32wnd->getClientRectPtr(), (PRECTLOS2)&rect); 456 454 457 455 458 swpClient.hwnd = win32wnd->getOS2WindowHandle(); -
trunk/src/user32/new/scroll.cpp
r2426 r2433 1 /* $Id: scroll.cpp,v 1.1 0 2000-01-13 13:54:53sandervl Exp $ */1 /* $Id: scroll.cpp,v 1.11 2000-01-13 20:11:37 sandervl Exp $ */ 2 2 /* 3 3 * Scrollbar control … … 125 125 if (!win32wnd) return FALSE; 126 126 rectClient = *win32wnd->getClientRectPtr(); 127 if(win32wnd->getParent())128 mapWin32Rect(win32wnd->getParent() ? win32wnd->getParent()->getOS2WindowHandle():OSLIB_HWND_DESKTOP,win32wnd->getOS2FrameWindowHandle(),&rectClient);129 127 lprect->left = rectClient.left; 130 128 lprect->top = rectClient.bottom; … … 148 146 if (!win32wnd) return FALSE; 149 147 rectClient = *win32wnd->getClientRectPtr(); 150 if(win32wnd->getParent())151 mapWin32Rect(win32wnd->getParent() ? win32wnd->getParent()->getOS2WindowHandle():OSLIB_HWND_DESKTOP,win32wnd->getOS2FrameWindowHandle(),&rectClient);152 148 lprect->left = rectClient.right; 153 149 lprect->top = rectClient.top; … … 1473 1469 { 1474 1470 Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd); 1475 // BOOL fShowH = (nBar == SB_HORZ) ? 0:fShow,fShowV = (nBar == SB_VERT) ? 0:fShow;1476 1471 BOOL fShowH = (nBar == SB_HORZ) ? fShow : 0; 1477 1472 BOOL fShowV = (nBar == SB_VERT) ? fShow : 0; -
trunk/src/user32/new/win32wbase.cpp
r2426 r2433 1 /* $Id: win32wbase.cpp,v 1.3 8 2000-01-13 13:54:53sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.39 2000-01-13 20:11:37 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 13 13 * 14 14 * TODO: Not thread/process safe 15 * 16 * NOTE: Client rectangle always relative to frame window; window rectangle in screen coordinates 15 17 * 16 18 * Project Odin Software License can be found in LICENSE.TXT … … 639 641 // Subclass frame 640 642 pOldFrameProc = FrameSubclassFrameWindow(this); 641 //if (isChild()) FrameSetBorderSize(this,TRUE);642 643 643 644 //preset rects … … 647 648 rectWindow.bottom = cs->y+cs->cy; 648 649 rectClient = rectWindow; //dummy client rect 650 OffsetRect(&rectClient, -rectClient.left, -rectClient.top); 651 649 652 if (getParent()) mapWin32Rect(getParent()->getOS2WindowHandle(),OSLIB_HWND_DESKTOP,&rectWindow); 650 653 /* Send the WM_CREATE message … … 660 663 if (SendInternalMessageA(WM_NCCREATE,0,(LPARAM)cs)) 661 664 { 665 RECT tmpRect; 666 662 667 //update rect 663 668 rectWindow.left = cs->x; … … 665 670 rectWindow.top = cs->y; 666 671 rectWindow.bottom = cs->y+cs->cy; 672 tmpRect = rectWindow; 667 673 if (getParent()) mapWin32Rect(getParent()->getOS2WindowHandle(),OSLIB_HWND_DESKTOP,&rectWindow); 668 674 OffsetRect(&rectWindow, maxPos.x - rectWindow.left, maxPos.y - rectWindow.top); 675 669 676 rectClient = rectWindow; 670 if (getParent()) mapWin32Rect(OSLIB_HWND_DESKTOP,getParent()->getOS2WindowHandle(),&rectClient); 677 OffsetRect(&rectClient, -rectClient.left, -rectClient.top); 678 671 679 //set the window size and update the client 672 SetWindowPos(hwndLinkAfter, rectClient.left,rectClient.top,rectClient.right-rectClient.left,rectClient.bottom-rectClient.top,SWP_NOACTIVATE | SWP_NOREDRAW | SWP_FRAMECHANGED);680 SetWindowPos(hwndLinkAfter, tmpRect.left, tmpRect.top, tmpRect.right-tmpRect.left, tmpRect.bottom-tmpRect.top,SWP_NOACTIVATE | SWP_NOREDRAW | SWP_FRAMECHANGED); 673 681 fNoSizeMsg = FALSE; 674 682 if (cs->style & WS_VISIBLE) dwStyle |= WS_VISIBLE; //program could change position in WM_CREATE … … 679 687 MAKELONG(rectClient.right-rectClient.left, 680 688 rectClient.bottom-rectClient.top)); 681 SendInternalMessageA(WM_MOVE, 0, MAKELONG( rectClient.left, rectClient.top ) ); 689 DWORD lParam; 690 691 if(getParent()) {//in parent coordinates 692 POINT point; 693 694 point.x = rectClient.left; 695 point.y = rectClient.top; 696 MapWindowPoints(getWindowHandle(), getParent()->getWindowHandle(), &point, 1); 697 698 lParam = MAKELONG(point.x, point.y); 699 } 700 else {//in screen coordinates 701 lParam = MAKELONG(rectWindow.left+rectClient.left, rectWindow.top+rectClient.top); 702 } 703 SendInternalMessageA(WM_MOVE, 0, lParam); 682 704 } 683 705 … … 1036 1058 RECT client = rectClient; 1037 1059 1038 mapWin32Rect(getParent() ? getParent()->getOS2WindowHandle():OSLIB_HWND_DESKTOP,OS2HwndFrame,&client);1060 //// mapWin32Rect(getParent() ? getParent()->getOS2WindowHandle():OSLIB_HWND_DESKTOP,OS2HwndFrame,&client); 1039 1061 if ((rect.left >= client.left) && (rect.left < client.right) && 1040 1062 (rect.right >= client.left) && (rect.right < client.right) && … … 1405 1427 case WM_WINDOWPOSCHANGED: 1406 1428 { 1407 1408 /* undocumented SWP flags - from SDK 3.1 */1409 #define SWP_NOCLIENTSIZE 0x08001410 #define SWP_NOCLIENTMOVE 0x10001411 1412 1429 PWINDOWPOS wpos = (PWINDOWPOS)lParam; 1413 1430 WPARAM wp = SIZE_RESTORED; 1414 1431 1415 1432 if (!(wpos->flags & SWP_NOMOVE) && !(wpos->flags & SWP_NOCLIENTMOVE)) 1416 SendInternalMessageA(WM_MOVE, 0, MAKELONG(rectClient.left, rectClient.top)); 1417 1433 { 1434 DWORD lParam; 1435 1436 if(getParent()) {//in parent coordinates 1437 POINT point; 1438 1439 point.x = rectClient.left; 1440 point.y = rectClient.top; 1441 MapWindowPoints(getWindowHandle(), getParent()->getWindowHandle(), &point, 1); 1442 1443 lParam = MAKELONG(point.x, point.y); 1444 } 1445 else {//in screen coordinates 1446 lParam = MAKELONG(rectWindow.left+rectClient.left, rectWindow.top+rectClient.top); 1447 } 1448 SendInternalMessageA(WM_MOVE, 0, lParam); 1449 } 1418 1450 if (!(wpos->flags & SWP_NOSIZE) && !(wpos->flags & SWP_NOCLIENTSIZE)) 1419 1451 { … … 1422 1454 1423 1455 SendInternalMessageA(WM_SIZE, wp, MAKELONG(rectClient.right - rectClient.left, 1424 rectClient.bottom - rectClient.top));1456 rectClient.bottom - rectClient.top)); 1425 1457 } 1426 1458 return 0; … … 1939 1971 1940 1972 dprintf(("ShowWindow %x %x", getWindowHandle(), nCmdShow)); 1941 #if 1 1973 1942 1974 if (flags & WIN_NEED_SIZE) 1943 1975 { … … 1955 1987 MAKELONG(rectClient.right-rectClient.left, 1956 1988 rectClient.bottom-rectClient.top)); 1957 SendInternalMessageA(WM_MOVE, 0, MAKELONG( rectClient.left, rectClient.top ) ); 1958 } 1959 #else 1960 if(fFirstShow) { 1961 if(isFrameWindow() && IS_OVERLAPPED(getStyle()) && !isChild()) { 1962 SendInternalMessageA(WM_SIZE, SIZE_RESTORED, 1963 MAKELONG(rectClient.right-rectClient.left, 1964 rectClient.bottom-rectClient.top)); 1965 SendInternalMessageA(WM_MOVE, 0, MAKELONG( rectClient.left, rectClient.top ) ); 1966 1967 } 1968 fFirstShow = FALSE; 1969 } 1970 #endif 1989 DWORD lParam; 1990 1991 if(getParent()) {//in parent coordinates 1992 POINT point; 1993 1994 point.x = rectClient.left; 1995 point.y = rectClient.top; 1996 MapWindowPoints(getWindowHandle(), getParent()->getWindowHandle(), &point, 1); 1997 1998 lParam = MAKELONG(point.x, point.y); 1999 } 2000 else {//in screen coordinates 2001 lParam = MAKELONG(rectWindow.left+rectClient.left, rectWindow.top+rectClient.top); 2002 } 2003 SendInternalMessageA(WM_MOVE, 0, lParam); 2004 } 1971 2005 switch(nCmdShow) 1972 2006 { -
trunk/src/user32/new/win32wbase.h
r2426 r2433 1 /* $Id: win32wbase.h,v 1.2 6 2000-01-13 13:54:54sandervl Exp $ */1 /* $Id: win32wbase.h,v 1.27 2000-01-13 20:11:38 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 206 206 HWND GetParent(); 207 207 HWND SetParent(HWND hwndNewParent); 208 208 209 BOOL IsChild(HWND hwndParent); 209 210 HWND GetTopWindow(); -
trunk/src/user32/new/win32wbasenonclient.cpp
r2426 r2433 1 /* $Id: win32wbasenonclient.cpp,v 1. 4 2000-01-13 13:54:54sandervl Exp $ */1 /* $Id: win32wbasenonclient.cpp,v 1.5 2000-01-13 20:11:39 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 (non-client methods) … … 357 357 UINT style; 358 358 359 if (!calcValidRects) return 0; 360 361 style = (UINT) GetClassLongA(Win32Hwnd,GCL_STYLE); 362 363 if (style & CS_VREDRAW) result |= WVR_VREDRAW; 364 if (style & CS_HREDRAW) result |= WVR_HREDRAW; 365 366 clientRect = &((NCCALCSIZE_PARAMS*)winRect)->rgrc[2]; 367 *clientRect = rectWindow; 368 if (getParent()) mapWin32Rect(OSLIB_HWND_DESKTOP,getParent()->getOS2WindowHandle(),clientRect); 369 370 if(!(dwStyle & WS_MINIMIZE)) 371 { 372 AdjustRectOuter(&tmpRect,FALSE); 373 374 clientRect->left -= tmpRect.left; 375 clientRect->top -= tmpRect.top; 376 clientRect->right -= tmpRect.right; 377 clientRect->bottom -= tmpRect.bottom; 378 379 if (HAS_MENU()) 380 { 381 clientRect->top += 359 if (!calcValidRects) return 0; 360 361 style = (UINT) GetClassLongA(Win32Hwnd,GCL_STYLE); 362 363 if (style & CS_VREDRAW) result |= WVR_VREDRAW; 364 if (style & CS_HREDRAW) result |= WVR_HREDRAW; 365 366 clientRect = &((NCCALCSIZE_PARAMS*)winRect)->rgrc[2]; 367 *clientRect = rectWindow; 368 #if 1 369 OffsetRect(clientRect, -clientRect->left, -clientRect->top); 370 #else 371 if(getParent()) {//in parent coordinates 372 OffsetRect(clientRect, -clientRect->left, -clientRect->top); 373 MapWindowPoints(getWindowHandle(), getParent()->getWindowHandle(), (POINT *)clientRect, 2); 374 } 375 //else in screen coordinates (already in screen coordinates) 376 #endif 377 378 if(!(dwStyle & WS_MINIMIZE)) 379 { 380 AdjustRectOuter(&tmpRect,FALSE); 381 382 clientRect->left -= tmpRect.left; 383 clientRect->top -= tmpRect.top; 384 clientRect->right -= tmpRect.right; 385 clientRect->bottom -= tmpRect.bottom; 386 387 if (HAS_MENU()) 388 { 389 clientRect->top += 382 390 MENU_GetMenuBarHeight(Win32Hwnd, 383 391 winRect->right - winRect->left, 384 392 -tmpRect.left, -tmpRect.top ) + 1; 385 }386 387 SetRect (&tmpRect, 0, 0, 0, 0);388 AdjustRectInner(&tmpRect);389 clientRect->left -= tmpRect.left;390 clientRect->top -= tmpRect.top;391 clientRect->right -= tmpRect.right;392 clientRect->bottom -= tmpRect.bottom;393 }394 395 return result;393 } 394 395 SetRect (&tmpRect, 0, 0, 0, 0); 396 AdjustRectInner(&tmpRect); 397 clientRect->left -= tmpRect.left; 398 clientRect->top -= tmpRect.top; 399 clientRect->right -= tmpRect.right; 400 clientRect->bottom -= tmpRect.bottom; 401 } 402 403 return result; 396 404 } 397 405 //****************************************************************************** -
trunk/src/user32/new/win32wbasepos.cpp
r2410 r2433 1 /* $Id: win32wbasepos.cpp,v 1. 5 2000-01-11 17:34:44 cbratschiExp $ */1 /* $Id: win32wbasepos.cpp,v 1.6 2000-01-13 20:11:39 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 (nonclient/position methods) … … 134 134 winposCopy = *winpos; 135 135 params.rgrc[1] = *oldWindowRect; 136 #if 0 137 if(getParent()) {//in parent coordinates 138 MapWindowPoints(getWindowHandle(), getParent()->getWindowHandle(), (POINT *)oldClientRect, 2); 139 } 140 else {//in screen coordinates (just add window rectangle origin (already in screen coordinates)) 141 OffsetRect(oldClientRect, rectWindow.left, rectWindow.top); 142 } 143 #endif 136 144 params.rgrc[2] = *oldClientRect; 137 145 params.lppos = &winposCopy; 138 146 } 139 result = SendInternalMessageA(WM_NCCALCSIZE, calcValidRect, 140 (LPARAM)¶ms ); 147 result = SendInternalMessageA(WM_NCCALCSIZE, calcValidRect, (LPARAM)¶ms ); 141 148 if (calcValidRect) 142 149 { 143 150 /* If the application send back garbage, ignore it */ 144 151 if (params.rgrc[2].left <= params.rgrc[2].right && params.rgrc[2].top <= params.rgrc[2].bottom) 145 *newClientRect = params.rgrc[2]; 152 { 153 *newClientRect = params.rgrc[2]; 154 #if 0 155 if(getParent()) {//in parent coordinates 156 MapWindowPoints(getParent()->getWindowHandle(), getWindowHandle(), (POINT *)newClientRect, 2); 157 } 158 else {//in screen coordinates (just add window rectangle origin (already in screen coordinates)) 159 OffsetRect(newClientRect, -rectWindow.left, -rectWindow.top); 160 } 161 #endif 162 } 146 163 else 147 164 SetRectEmpty(newClientRect);
Note:
See TracChangeset
for help on using the changeset viewer.