Ignore:
Timestamp:
Oct 20, 1999, 3:46:29 PM (26 years ago)
Author:
sandervl
Message:

position change bugfixes

File:
1 edited

Legend:

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

    r1336 r1376  
    1 /* $Id: win32wbasepos.cpp,v 1.3 1999-10-17 15:46:10 sandervl Exp $ */
     1/* $Id: win32wbasepos.cpp,v 1.4 1999-10-20 13:46:28 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2 (nonclient/position methods)
     
    186186 */
    187187void Win32BaseWindow::GetMinMaxInfo(POINT *maxSize, POINT *maxPos,
    188                                 POINT *minTrack, POINT *maxTrack )
     188                                    POINT *minTrack, POINT *maxTrack )
    189189{
    190190    MINMAXINFO MinMax;
     
    370370        if ((style & WS_CAPTION) == WS_CAPTION)
    371371        {
    372                 if (exStyle & WS_EX_TOOLWINDOW)
    373                         rect->top -= GetSystemMetrics(SM_CYSMCAPTION);
    374                 else
    375                         rect->top -= GetSystemMetrics(SM_CYCAPTION);
     372            if (exStyle & WS_EX_TOOLWINDOW)
     373                rect->top -= GetSystemMetrics(SM_CYSMCAPTION);
     374            else
     375                rect->top -= GetSystemMetrics(SM_CYCAPTION);
    376376        }
    377377//    }
    378378
    379379    if (menu)
    380             rect->top -= GetSystemMetrics(SM_CYMENU);
     380        rect->top -= GetSystemMetrics(SM_CYMENU);
    381381}
    382382/******************************************************************************
     
    410410
    411411    if (exStyle & WS_EX_CLIENTEDGE)
    412             InflateRect(rect, GetSystemMetrics(SM_CXEDGE), GetSystemMetrics(SM_CYEDGE));
     412        InflateRect(rect, GetSystemMetrics(SM_CXEDGE), GetSystemMetrics(SM_CYEDGE));
    413413
    414414    if (exStyle & WS_EX_STATICEDGE)
    415             InflateRect(rect, GetSystemMetrics(SM_CXBORDER), GetSystemMetrics(SM_CYBORDER));
     415        InflateRect(rect, GetSystemMetrics(SM_CXBORDER), GetSystemMetrics(SM_CYBORDER));
    416416
    417417    if (style & WS_VSCROLL) rect->right  += GetSystemMetrics(SM_CXVSCROLL);
    418418    if (style & WS_HSCROLL) rect->bottom += GetSystemMetrics(SM_CYHSCROLL);
    419419}
     420/***********************************************************************
     421 *           WINPOS_HandleWindowPosChanging16
     422 *
     423 * Default handling for a WM_WINDOWPOSCHANGING. Called from DefWindowProc().
     424 */
     425LONG Win32BaseWindow::HandleWindowPosChanging(WINDOWPOS *winpos)
     426{
     427 POINT maxSize, minTrack;
     428
     429    if (winpos->flags & SWP_NOSIZE)
     430        return 1;
     431
     432    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;
     444    }
     445    return 1;
     446}
    420447//******************************************************************************
    421448//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.