Changeset 4460 for trunk/src


Ignore:
Timestamp:
Oct 8, 2000, 10:05:29 PM (25 years ago)
Author:
sandervl
Message:

AdjustWindowRectEx fix for scrollbars

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/window.cpp

    r4457 r4460  
    1 /* $Id: window.cpp,v 1.78 2000-10-08 18:45:36 sandervl Exp $ */
     1/* $Id: window.cpp,v 1.79 2000-10-08 20:05:29 sandervl Exp $ */
    22/*
    33 * Win32 window apis for OS/2
     
    948948
    949949    //Adjust rect inner (Win32BaseWindow::AdjustRectInner)
    950     if (exStyle & WS_EX_CLIENTEDGE)
    951       InflateRect (rect, GetSystemMetrics(SM_CXEDGE), GetSystemMetrics(SM_CYEDGE));
    952 
    953     if (exStyle & WS_EX_STATICEDGE)
    954       InflateRect (rect, GetSystemMetrics(SM_CXBORDER), GetSystemMetrics(SM_CYBORDER));
    955 
    956     if (style & WS_VSCROLL) rect->right  += GetSystemMetrics(SM_CXVSCROLL);
    957     if (style & WS_HSCROLL) rect->bottom += GetSystemMetrics(SM_CYHSCROLL);
     950    if(!(style & WS_ICONIC)) {
     951        if (exStyle & WS_EX_CLIENTEDGE)
     952                InflateRect (rect, GetSystemMetrics(SM_CXEDGE), GetSystemMetrics(SM_CYEDGE));
     953
     954        if (exStyle & WS_EX_STATICEDGE)
     955                InflateRect (rect, GetSystemMetrics(SM_CXBORDER), GetSystemMetrics(SM_CYBORDER));
     956
     957        //SvL: scrollbars aren't checked *UNLESS* the style includes a border (any border)
     958        //     --> VERIFIED IN NT4, SP6 (fixes MFC apps with scrollbars + bar controls)
     959        if(style & (WS_THICKFRAME|WS_BORDER|WS_DLGFRAME)) {
     960                if (style & WS_VSCROLL) rect->right  += GetSystemMetrics(SM_CXVSCROLL);
     961                if (style & WS_HSCROLL) rect->bottom += GetSystemMetrics(SM_CYHSCROLL);
     962        }
     963    }
    958964
    959965    dprintf(("AdjustWindowRectEx returned (%d,%d)(%d,%d)\n", rect->left, rect->top, rect->right, rect->bottom));
Note: See TracChangeset for help on using the changeset viewer.