Ignore:
Timestamp:
Jun 15, 2001, 4:07:22 PM (24 years ago)
Author:
sandervl
Message:

dialog + os/2 frame control fixes

File:
1 edited

Legend:

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

    r6008 r6019  
    1 /* $Id: oslibwin.cpp,v 1.101 2001-06-14 11:30:55 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.102 2001-06-15 14:07:22 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    9696    if(fOS2Look && *hwndFrame) {
    9797        FCData.flCreateFlags = dwOSFrameStyle;
     98//        FCData.flCreateFlags = FCF_TITLEBAR|FCF_SYSMENU|FCF_MINMAX;
    9899        WinCreateFrameControls(*hwndFrame, &FCData, NULL);
    99100    }
     
    199200          i++;
    200201      }
    201       else return; //no titlebar -> no frame controls
     202      else return FALSE; //no titlebar -> no frame controls
    202203  }
    203204  if((dwStyle & WS_MINIMIZEBOX_W) || (dwStyle & WS_MAXIMIZEBOX_W) || (dwStyle & WS_SYSMENU_W)) {
     
    890891         WinSetWindowULong(hwndFrame, QWL_STYLE, dwWinStyle);
    891892    }
     893    if(fOS2Look) {
     894        ULONG OSFrameStyle = 0;
     895        if((dwStyle & WS_CAPTION_W) == WS_CAPTION_W) {
     896            if(WinWindowFromID(hwndFrame, FID_TITLEBAR) == 0) {
     897                OSFrameStyle = FCF_TITLEBAR;
     898            }
     899            if((dwStyle & WS_SYSMENU_W) && !(dwExStyle & WS_EX_TOOLWINDOW_W))
     900            {
     901                if(WinWindowFromID(hwndFrame, FID_SYSMENU) == 0) {
     902                    OSFrameStyle |= FCF_SYSMENU;
     903                }
     904            }
     905            if((dwStyle & WS_MINIMIZEBOX_W) || (dwStyle & WS_MAXIMIZEBOX_W)) {
     906                if(WinWindowFromID(hwndFrame, FID_MINMAX) == 0) {
     907                    OSFrameStyle |= FCF_MINMAX;
     908                }
     909            }
     910            else
     911            if(dwStyle & WS_SYSMENU_W) {
     912                if(WinWindowFromID(hwndFrame, FID_MINMAX) == 0) {
     913                    OSFrameStyle |= FCF_CLOSEBUTTON;
     914                }
     915            }
     916        }
     917        if(OSFrameStyle) {
     918            FRAMECDATA FCData = {sizeof (FRAMECDATA), 0, 0, 0};
     919
     920            FCData.flCreateFlags = OSFrameStyle;
     921            WinCreateFrameControls(hwndFrame, &FCData, NULL);
     922        }
     923    }
    892924}
    893925//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.