Changeset 10013 for trunk/src


Ignore:
Timestamp:
Apr 11, 2003, 5:22:34 PM (22 years ago)
Author:
sandervl
Message:

Tool windows don't have minimize or maximize buttons; always draw tool windows in win32 style as they are not compatible with PM frame controls

Location:
trunk/src/user32
Files:
4 edited

Legend:

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

    r9943 r10013  
    1 /* $Id: oslibwin.cpp,v 1.141 2003-03-27 11:02:26 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.142 2003-04-11 15:22:33 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    6262                          char *pszName, HWND Owner, ULONG fHWND_BOTTOM,
    6363                          ULONG id, BOOL fTaskList,BOOL fShellPosition,
    64                           int classStyle, HWND *hwndFrame)
     64                          DWORD classStyle, HWND *hwndFrame)
    6565{
    6666 HWND  hwndClient;
     
    101101                           Owner, (fHWND_BOTTOM) ? HWND_BOTTOM : HWND_TOP,
    102102                           id, (PVOID)&FCData, NULL);
     103
    103104    if(fOS2Look && *hwndFrame) {
    104105        FCData.flCreateFlags = dwOSFrameStyle;
     
    142143        *OSWinStyle |= WS_TOPMOST;
    143144
    144   if(fOS2Look) {
     145  //WS_EX_TOOLWINDOW is incompatible with the OS2Look (titlebar thinner + smaller font)
     146  if(fOS2Look && !(dwExStyle & WS_EX_TOOLWINDOW_W))
     147  {
    145148      if((dwStyle & WS_CAPTION_W) == WS_CAPTION_W) {
    146149          *OSFrameStyle = FCF_TITLEBAR;
     
    176179
    177180  dprintf(("OSLibWinPositionFrameControls %x (%x,%x) %x %d", hwndFrame, dwStyle, dwExStyle, hSysMenuIcon, drawCloseButton));
     181
     182  //WS_EX_TOOLWINDOW is incompatible with the OS2Look (titlebar thinner + smaller font)
     183  if(dwExStyle & WS_EX_TOOLWINDOW_W) {
     184      DebugInt3();
     185      return FALSE;
     186  }
    178187
    179188  if(minmaxwidth == 0) {
     
    10751084      dwWinStyle &= ~WS_MAXIMIZED;
    10761085
    1077     if(fOS2Look) {
     1086    //WS_EX_TOOLWINDOW is incompatible with the OS2Look (titlebar thinner + smaller font)
     1087    if(fOS2Look && !(dwExStyle & WS_EX_TOOLWINDOW_W)) {
    10781088        ULONG OSFrameStyle = 0;
    10791089        SWP rc1,rc2,rc3;
     
    11641174
    11651175   if(dwWinStyle != dwOldWinStyle) {
    1166           dprintf(("Setting new window U long"));
    1167           WinSetWindowULong(hwndFrame, QWL_STYLE, dwWinStyle);
     1176       dprintf(("Setting new window U long"));
     1177       WinSetWindowULong(hwndFrame, QWL_STYLE, dwWinStyle);
    11681178   }
    11691179
  • trunk/src/user32/oslibwin.h

    r9943 r10013  
    1 /* $Id: oslibwin.h,v 1.74 2003-03-27 11:02:26 sandervl Exp $ */
     1/* $Id: oslibwin.h,v 1.75 2003-04-11 15:22:33 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    4444                           char *pszName, HWND Owner, ULONG fBottom,
    4545                           ULONG id, BOOL fTaskList,BOOL fShellPosition,
    46                            int classStyle, HWND *hwndFrame);
     46                           DWORD classStyle, HWND *hwndFrame);
    4747
    4848BOOL  OSLibWinConvertStyle(ULONG dwStyle, ULONG dwExStyle, ULONG *OSWinStyle,
  • trunk/src/user32/win32wbase.cpp

    r9953 r10013  
    1 /* $Id: win32wbase.cpp,v 1.365 2003-03-29 16:38:00 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.366 2003-04-11 15:22:33 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    13901390  }
    13911391#endif
    1392   if(fOS2Look && ((dwStyle & WS_CAPTION) == WS_CAPTION))
     1392  //WS_EX_TOOLWINDOW is incompatible with the OS2Look (titlebar thinner + smaller font)
     1393  if(fOS2Look && ((dwStyle & WS_CAPTION) == WS_CAPTION) && !(dwExStyle & WS_EX_TOOLWINDOW))
    13931394  {
    13941395      RECT rect = {0};
  • trunk/src/user32/win32wbasenonclient.cpp

    r9871 r10013  
    1 /* $Id: win32wbasenonclient.cpp,v 1.50 2003-02-28 09:56:00 sandervl Exp $ */
     1/* $Id: win32wbasenonclient.cpp,v 1.51 2003-04-11 15:22:34 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2 (non-client methods)
     
    906906  HBITMAP memBmp,oldBmp;
    907907
    908   if(fOS2Look) {
     908  //WS_EX_TOOLWINDOW is incompatible with the OS2Look (titlebar thinner + smaller font)
     909  if(fOS2Look && !(dwExStyle & WS_EX_TOOLWINDOW)) {
    909910      //Note: If no class icon *and* WS_EX_DLGMODALFRAME -> no system menu
    910911      if((dwStyle & WS_SYSMENU) && !(dwExStyle & WS_EX_TOOLWINDOW) &&
     
    10141015    }
    10151016
    1016     if ((dwStyle & WS_MAXIMIZEBOX) || (dwStyle & WS_MINIMIZEBOX))
     1017    //Testing in NT4 shows that tool windows never have a minimize or maximize button!
     1018    if (((dwStyle & WS_MAXIMIZEBOX) || (dwStyle & WS_MINIMIZEBOX)) &&
     1019        !(dwExStyle & WS_EX_TOOLWINDOW))
    10171020    {
    10181021      /* In win95 the two buttons are always there */
Note: See TracChangeset for help on using the changeset viewer.