Ignore:
Timestamp:
Jul 17, 1999, 5:23:38 PM (26 years ago)
Author:
sandervl
Message:

* empty log message *

File:
1 edited

Legend:

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

    r322 r323  
    1 /* $Id: oslibwin.cpp,v 1.7 1999-07-17 12:49:40 cbratschi Exp $ */
     1/* $Id: oslibwin.cpp,v 1.8 1999-07-17 15:23:38 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    3838//******************************************************************************
    3939HWND OSLibWinCreateWindow(HWND hwndParent, ULONG dwWinStyle, ULONG dwFrameStyle,
    40                           char *pszName, ULONG x, ULONG y, ULONG cx, ULONG cy,
    41                           HWND Owner, ULONG fHWND_BOTTOM, HWND *hwndFrame)
     40                          char *pszName, HWND Owner, ULONG fHWND_BOTTOM, HWND *hwndFrame)
    4241{
    4342 HWND  hwndClient;
    4443 RECTL rectl;
    4544
     45  if(pszName && *pszName == 0) {
     46        pszName = NULL;
     47  }
    4648  if(hwndParent == 0) {
    4749        hwndParent = HWND_DESKTOP;
    48   }
    49   if(WinQueryWindowRect(hwndParent, &rectl) == TRUE) {
    50         y = OS2TOWIN32POINT(rectl.yTop - rectl.yBottom, y);
    5150  }
    5251  if(dwFrameStyle) {
     
    5958                        WinSetWindowText(*hwndFrame, pszName);
    6059                }
    61                 WinSetWindowPos(*hwndFrame, (fHWND_BOTTOM) ? HWND_BOTTOM :HWND_TOP,
    62                                 x, y, cx, cy, SWP_SIZE | SWP_MOVE);
    63 
    6460                return hwndClient;
    6561        }
     
    6763        return 0;
    6864  }
    69   hwndClient = WinCreateWindow(hwndParent, WIN32_STDCLASS, pszName, dwWinStyle, x, y, cx, cy,
     65  hwndClient = WinCreateWindow(hwndParent, WIN32_STDCLASS, pszName, dwWinStyle, 0, 0, 0, 0,
    7066                               Owner, (fHWND_BOTTOM) ? HWND_BOTTOM :HWND_TOP, 0, NULL,
    7167                               NULL);
     
    8379  if(dwStyle & WINWS_MINIMIZE)
    8480        *OSWinStyle |= WS_MINIMIZED;
     81//Done explicitely in CreateWindowExA
     82#if 0
    8583  if(dwStyle & WINWS_VISIBLE)
    8684        *OSWinStyle |= WS_VISIBLE;
     85#endif
    8786  if(dwStyle & WINWS_DISABLED)
    8887        *OSWinStyle |= WS_DISABLED;
     
    178177                          LONG cy, ULONG fl)
    179178{
     179 RECTL rectl;
     180 HWND  hwndParent;
     181
     182  if(fl & SWP_MOVE) {
     183        hwndParent = WinQueryWindow(hwnd, QW_PARENT);
     184        if(WinQueryWindowRect(hwnd, &rectl)) {
     185                y = OS2TOWIN32POINT(rectl.yTop - rectl.yBottom, y);
     186        }
     187  }
    180188  return WinSetWindowPos(hwnd, hwndInsertBehind, x, y, cx, cy, fl);
    181189}
     
    184192BOOL OSLibWinShowWindow(HWND hwnd, ULONG fl)
    185193{
    186   return WinSetWindowPos(hwnd, 0, 0, 0, 0, 0, fl);
     194 BOOL rc;
     195
     196  if(fl & SWP_SHOW) {
     197         rc = WinShowWindow(hwnd, TRUE);
     198  }
     199  if(rc == 0)
     200        dprintf(("WinShowWindow %x failed %x", hwnd, WinGetLastError(GetThreadHAB())));
     201  rc = WinSetWindowPos(hwnd, 0, 0, 0, 0, 0, fl);
     202  if(rc == 0)
     203        dprintf(("WinShowWindow %x failed %x", hwnd, WinGetLastError(GetThreadHAB())));
     204  return rc;
    187205}
    188206//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.