Ignore:
Timestamp:
Jan 8, 2000, 3:15:38 PM (26 years ago)
Author:
sandervl
Message:

OSLibGetMsg bugfix + WM_QUIT translation fix

File:
1 edited

Legend:

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

    r2257 r2371  
    1 /* $Id: oslibwin.cpp,v 1.56 1999-12-29 22:54:01 cbratschi Exp $ */
     1/* $Id: oslibwin.cpp,v 1.57 2000-01-08 14:15:06 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    7070  }
    7171  ULONG dwClientStyle;
    72 #if 1
    7372
    7473  BOOL TopLevel = hwndParent == HWND_DESKTOP;
     
    9897                                  NULL, dwClientStyle, 0, 0, 0, 0,
    9998                                  *hwndFrame, HWND_TOP, FID_CLIENT, NULL, NULL);
    100     if (hwndClient != NULLHANDLE)
    101       WinSendMsg (*hwndFrame, WM_UPDATEFRAME, 0, 0);
    102 
     99   
     100    if (hwndClient != NULLHANDLE) {
     101        WinSendMsg (*hwndFrame, WM_UPDATEFRAME, 0, 0);
     102    }
    103103    return hwndClient;
    104104  }
    105105  dprintf(("OSLibWinCreateWindow: (FRAME) WinCreateStdWindow failed (%x)", WinGetLastError(GetThreadHAB())));
    106106  return 0;
    107 #else
    108         dwClientStyle = dwWinStyle & ~(WS_TABSTOP | WS_GROUP);
    109 
    110         dwFrameStyle |= FCF_NOBYTEALIGN;
    111         if ((hwndParent == HWND_DESKTOP) && (dwFrameStyle & FCF_TITLEBAR))
    112                 dwFrameStyle |= FCF_TASKLIST | FCF_NOMOVEWITHOWNER;
    113 
    114         dwWinStyle   &= ~WS_CLIPCHILDREN;
    115 
    116         *hwndFrame = WinCreateStdWindow(hwndParent, dwWinStyle,
    117                                        &dwFrameStyle, WIN32_STDCLASS,
    118                                        "", dwClientStyle, 0, id, &hwndClient);
    119         if(*hwndFrame) {
    120                 if(pszName) {
    121                         WinSetWindowText(*hwndFrame, pszName);
    122                 }
    123                 return hwndClient;
    124         }
    125         dprintf(("OSLibWinCreateWindow: (FRAME) WinCreateStdWindow failed (%x)", WinGetLastError(GetThreadHAB())));
    126         return 0;
    127 #endif
    128107}
    129108//******************************************************************************
     
    216195    if(dwStyle & WS_THICKFRAME_W)
    217196          *OSFrameStyle |= FCF_SIZEBORDER;        //??
    218     if(dwStyle & WS_MINIMIZEBOX_W)
     197
     198    //SvL: We subclass the titlebar control when win32 look is selected
     199    if(fOS2Look) {
     200        if(dwStyle & WS_MINIMIZEBOX_W)
    219201          *OSFrameStyle |= FCF_MINBUTTON;
    220     if(dwStyle & WS_MAXIMIZEBOX_W)
     202        if(dwStyle & WS_MAXIMIZEBOX_W)
    221203          *OSFrameStyle |= FCF_MAXBUTTON;
     204    }
    222205
    223206    if(*dwExStyle & WS_EX_DLGMODALFRAME_W)
     
    11651148  return WinGetLastError(GetThreadHAB()) & 0xFFFF;
    11661149}
     1150//******************************************************************************
     1151//TODO: Include scroll bars?
     1152//******************************************************************************
     1153HWND OSLibWinIsFrameControl(HWND hwnd)
     1154{
     1155 HWND hwndFrame = WinQueryWindow(hwnd, QW_PARENT);
     1156   
     1157   if(hwnd == WinWindowFromID(hwndFrame, FID_TITLEBAR)) {
     1158        return hwndFrame;
     1159   }
     1160   if(hwnd == WinWindowFromID(hwndFrame, FID_MENU)) {
     1161        return hwndFrame;
     1162   }
     1163   return 0;
     1164}
     1165//******************************************************************************
     1166//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.