Ignore:
Timestamp:
Jan 11, 2000, 6:34:44 PM (26 years ago)
Author:
cbratschi
Message:

fixed dialog rect

File:
1 edited

Legend:

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

    r2408 r2410  
    1 /* $Id: win32wbase.cpp,v 1.33 2000-01-11 13:52:19 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.34 2000-01-11 17:34:43 cbratschi Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    55 * Copyright 1998-2000 Sander van Leeuwen (sandervl@xs4all.nl)
    66 * Copyright 1999      Daniela Engert (dani@ngrt.de)
    7  * Copyright 2000      Christoph Bratschi (cbratschi@datacomm.ch)
     7 * Copyright 1999-2000 Christoph Bratschi (cbratschi@datacomm.ch)
    88 *
    99 * Parts based on Wine Windows code (windows\win.c)
     
    5151#define SC_PUTMARK              (SC_SCREENSAVE+2)
    5252
    53 #define HAS_DLGFRAME(style,exStyle) \
    54     (((exStyle) & WS_EX_DLGMODALFRAME) || \
    55      (((style) & WS_DLGFRAME) && !((style) & WS_THICKFRAME)))
    56 
    57 #define HAS_THICKFRAME(style,exStyle) \
    58     (((style) & WS_THICKFRAME) && \
    59      !((exStyle) & WS_EX_DLGMODALFRAME) && \
    60      !((style) & WS_CHILD))
    61 
    62 #define HAS_THINFRAME(style) \
    63     (((style) & WS_BORDER) || !((style) & (WS_CHILD | WS_POPUP)))
    64 
    65 #define HAS_BIGFRAME(style,exStyle) \
    66     (((style) & (WS_THICKFRAME | WS_DLGFRAME)) || \
    67      ((exStyle) & WS_EX_DLGMODALFRAME))
    68 
    69 #define HAS_ANYFRAME(style,exStyle) \
    70     (((style) & (WS_THICKFRAME | WS_DLGFRAME | WS_BORDER)) || \
    71      ((exStyle) & WS_EX_DLGMODALFRAME) || \
    72      !((style) & (WS_CHILD | WS_POPUP)))
    73 
    74 #define HAS_3DFRAME(exStyle) \
    75     ((exStyle & WS_EX_CLIENTEDGE) || (exStyle & WS_EX_STATICEDGE) || (exStyle & WS_EX_WINDOWEDGE))
    76 
    77 #define HAS_BORDER(style, exStyle) \
    78     ((style & WS_BORDER) || HAS_THICKFRAME(style) || HAS_DLGFRAME(style,exStyle))
    79 
    80 #define IS_OVERLAPPED(style) \
    81     !(style & (WS_CHILD | WS_POPUP))
    82 
    83 #define HAS_MENU() (!(getStyle() & WS_CHILD) && (GetMenu() != 0))
    84 
    8553/* bits in the dwKeyData */
    8654#define KEYDATA_ALT         0x2000
     
    10901058//dprintf(("CB: %d %d %d %d",rect.left,rect.top,rect.bottom,rect.right));
    10911059    DeleteObject(hrgn);
    1092     //CB: todo: check if intersection with client
     1060    //CB: todo: check if intersection with client, what does PM's frame???
    10931061
    10941062    return rc;
     
    16101578    case WM_SYSCHAR:
    16111579    {
    1612             int iMenuSysKey = 0;
    1613             if (wParam == VK_RETURN && (getStyle() & WS_MINIMIZE))
    1614         {
    1615                 PostMessageA(getWindowHandle(), WM_SYSCOMMAND,
     1580            int iMenuSysKey = 0;
     1581            if (wParam == VK_RETURN && (getStyle() & WS_MINIMIZE))
     1582        {
     1583                PostMessageA(getWindowHandle(), WM_SYSCOMMAND,
    16161584                         (WPARAM)SC_RESTORE, 0L );
    1617                 break;
    1618         }
    1619             if ((HIWORD(lParam) & KEYDATA_ALT) && wParam)
    1620         {
    1621                 if (wParam == VK_TAB || wParam == VK_ESCAPE) break;
    1622                 if (wParam == VK_SPACE && (getStyle() & WS_CHILD))
     1585                break;
     1586        }
     1587            if ((HIWORD(lParam) & KEYDATA_ALT) && wParam)
     1588        {
     1589                if (wParam == VK_TAB || wParam == VK_ESCAPE) break;
     1590                if (wParam == VK_SPACE && (getStyle() & WS_CHILD))
    16231591                getParent()->SendMessageA(Msg, wParam, lParam );
    1624                 else
     1592                else
    16251593                SendMessageA(WM_SYSCOMMAND, (WPARAM)SC_KEYMENU, (LPARAM)(DWORD)wParam );
    16261594        }
    1627             else /* check for Ctrl-Esc */
     1595            else /* check for Ctrl-Esc */
    16281596            if (wParam != VK_ESCAPE) MessageBeep(0);
    1629             break;
     1597            break;
    16301598    }
    16311599
     
    27282696  if(IsWindowDestroyed()) return;
    27292697
    2730   //CB: todo: dwExStyle, creating new frame controls, destroy not used controls, WS_VISIBLE, WS_CHILD, ...
    2731   //    write test cases
    27322698  if ((dwStyle & 0xFFFF0000) != (oldStyle & 0xFFFF0000))
    27332699  {
    2734     //dprintf(("updateWindowStyle: %x %x",oldStyle,dwStyle));
    2735     OSLibSetWindowStyle(OS2HwndFrame, dwStyle, fTaskList);
     2700    //CB: update
     2701    //OSLibSetWindowStyle(OS2HwndFrame, dwStyle, fTaskList);
    27362702  }
    27372703}
Note: See TracChangeset for help on using the changeset viewer.