Ignore:
Timestamp:
Jan 13, 2000, 9:11:39 PM (26 years ago)
Author:
sandervl
Message:

Client rectangle changes, GetDCEx bugfix (CS_OWNDC), scroll rectangle calculation fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/new/win32wbasenonclient.cpp

    r2426 r2433  
    1 /* $Id: win32wbasenonclient.cpp,v 1.4 2000-01-13 13:54:54 sandervl Exp $ */
     1/* $Id: win32wbasenonclient.cpp,v 1.5 2000-01-13 20:11:39 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2 (non-client methods)
     
    357357  UINT style;
    358358
    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 +=
    382390                MENU_GetMenuBarHeight(Win32Hwnd,
    383391                                       winRect->right - winRect->left,
    384392                                       -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;
    396404}
    397405//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.