Changeset 1118 for trunk/src/user32


Ignore:
Timestamp:
Oct 4, 1999, 11:56:04 AM (26 years ago)
Author:
sandervl
Message:

Lots of changes by several people (see changelog for 4 October

Location:
trunk/src/user32
Files:
5 edited

Legend:

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

    r1105 r1118  
    1 /* $Id: oslibwin.cpp,v 1.11 1999-10-02 04:09:12 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.12 1999-10-04 09:56:00 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    126126  } else
    127127  {
    128     if(dwStyle & WS_CAPTION_W)
     128    if((dwStyle & WS_CAPTION_W) == WS_CAPTION_W)
    129129          *OSFrameStyle |= FCF_TITLEBAR;
    130130    if(dwStyle & WS_DLGFRAME_W)
     
    828828                    (WinQueryWindowULong(hwnd, QWL_STYLE) & ~0xffff0000) |
    829829                    OSWinStyle);
    830 }
    831 //******************************************************************************
    832 //******************************************************************************
     830
     831  if(OSFrameStyle != 0)  // maybe WinQueryClassName == WC_FRAME is better
     832  {
     833    if(OSFrameStyle & FCF_TITLEBAR)
     834    {
     835      WinSetParent(OSLibWinObjectWindowFromID(hwnd, FID_TITLEBAR), hwnd, FALSE);
     836      WinSetParent(OSLibWinObjectWindowFromID(hwnd, FID_MENU), hwnd, FALSE);
     837    }
     838    else
     839    {
     840      WinSetParent(WinWindowFromID(hwnd, FID_TITLEBAR), HWND_OBJECT, FALSE);
     841      WinSetParent(WinWindowFromID(hwnd, FID_MENU), HWND_OBJECT, FALSE);
     842    }
     843    if(OSFrameStyle & FCF_SYSMENU)
     844      WinSetParent(OSLibWinObjectWindowFromID(hwnd, FID_SYSMENU), hwnd, FALSE);
     845    else
     846      WinSetParent(WinWindowFromID(hwnd, FID_SYSMENU), HWND_OBJECT, FALSE);
     847
     848    if(OSFrameStyle & FCF_MINBUTTON | OSFrameStyle & FCF_MAXBUTTON)
     849      WinSetParent(OSLibWinObjectWindowFromID(hwnd, FID_MINMAX), hwnd, FALSE);
     850    else
     851      WinSetParent(WinWindowFromID(hwnd, FID_MINMAX), HWND_OBJECT, FALSE);
     852
     853    if(OSFrameStyle & FCF_VERTSCROLL)
     854      WinSetParent(OSLibWinObjectWindowFromID(hwnd, FID_VERTSCROLL), hwnd, FALSE);
     855    else
     856      WinSetParent(WinWindowFromID(hwnd, FID_VERTSCROLL), HWND_OBJECT, FALSE);
     857
     858    if(OSFrameStyle & FCF_HORZSCROLL)
     859      WinSetParent(OSLibWinObjectWindowFromID(hwnd, FID_HORZSCROLL), hwnd, FALSE);
     860    else
     861      WinSetParent(WinWindowFromID(hwnd, FID_HORZSCROLL), HWND_OBJECT, FALSE);
     862
     863    WinSendMsg(hwnd, WM_UPDATEFRAME,
     864               MPFROMLONG(FCF_TITLEBAR | FCF_SYSMENU | FCF_MINMAX |
     865                          FCF_MENU | FCF_VERTSCROLL | FCF_HORZSCROLL),
     866               MPVOID);
     867  }
     868}
     869//******************************************************************************
     870//******************************************************************************
     871HWND OSLibWinObjectWindowFromID(HWND hwndOwner, ULONG ID)
     872{
     873  HWND   hwndNext, hwndFound=0;
     874  HENUM  henum;
     875
     876  henum = WinBeginEnumWindows(HWND_OBJECT);
     877  while ((hwndNext = WinGetNextWindow(henum)) != 0)
     878  {
     879    if(WinQueryWindow(hwndNext, QW_OWNER) == hwndOwner &&
     880       WinQueryWindowUShort(hwndNext, QWS_ID) == ID)
     881    {
     882       hwndFound = hwndNext;
     883       break;
     884    }
     885  }
     886  WinEndEnumWindows(henum);
     887  return hwndFound;
     888}
     889//******************************************************************************
     890//******************************************************************************
  • trunk/src/user32/oslibwin.h

    r1105 r1118  
    1 /* $Id: oslibwin.h,v 1.7 1999-10-02 04:09:13 sandervl Exp $ */
     1/* $Id: oslibwin.h,v 1.8 1999-10-04 09:56:00 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    243243BOOL  OSLibWinMapWindowPoints (HWND hwndFrom, HWND hwndTo, OSLIBPOINT *pptl, ULONG num);
    244244
     245HWND  OSLibWinObjectWindowFromID(HWND hwndOwner, ULONG ID);
     246
    245247#define OSLIB_HSCROLL   0
    246248#define OSLIB_VSCROLL   1
  • trunk/src/user32/win32dlg.cpp

    r1063 r1118  
    1 /* $Id: win32dlg.cpp,v 1.5 1999-09-26 14:44:58 sandervl Exp $ */
     1/* $Id: win32dlg.cpp,v 1.6 1999-10-04 09:56:01 sandervl Exp $ */
    22/*
    33 * Win32 Dialog Code for OS/2
     
    1919#include <win32dlg.h>
    2020#include "oslibmsg.h"
     21#include "win32wdesktop.h"
    2122
    2223#define DEFAULT_DLGFONT "9.WarpSans"
     
    229230    /* Owner must be a top-level window */
    230231    if(getOwner() == NULL) {
    231         dprintf(("Dialog box has no owner!!!"));
    232         return -1;
    233     }
    234     topOwner = getOwner()->getTopParent();
     232         topOwner = windowDesktop;
     233    }
     234    else topOwner = getOwner()->getTopParent();
     235
    235236    if(topOwner == NULL) {
    236237        dprintf(("Dialog box has no top owner!!!"));
  • trunk/src/user32/win32wbase.cpp

    r1105 r1118  
    1 /* $Id: win32wbase.cpp,v 1.21 1999-10-02 04:09:13 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.22 1999-10-04 09:56:02 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    11521152    //WM_NC*BUTTON* is posted when the cursor is in a non-client area of the window
    11531153    if(lastHitTestVal != HTCLIENT) {
    1154             SendInternalMessageA(win32ncmsg, lastHitTestVal, MAKELONG(ncx, ncy)); //TODO:
     1154            return SendInternalMessageA(win32ncmsg, lastHitTestVal, MAKELONG(ncx, ncy)); //TODO:
    11551155    }
    11561156    return  SendInternalMessageA(win32msg, 0, MAKELONG(clx, cly));
  • trunk/src/user32/windlg.cpp

    r1063 r1118  
    1 /* $Id: windlg.cpp,v 1.2 1999-09-26 14:44:58 sandervl Exp $ */
     1/* $Id: windlg.cpp,v 1.3 1999-10-04 09:56:03 sandervl Exp $ */
    22/*
    33 * Win32 dialog apis for OS/2
     
    3939        return 0;
    4040
    41     return CreateDialogIndirectParamA(hInst, (DLGTEMPLATE*)LoadResource(hInst, hrsrc),
     41    return CreateDialogIndirectParamA(hInst, (LPCDLGTEMPLATEA)LoadResource(hInst, hrsrc),
    4242                                      hwndOwner, dlgproc, lParamInit);
    4343}
     
    5353        return 0;
    5454
    55     return CreateDialogIndirectParamW(hInst, (DLGTEMPLATE*)LoadResource(hInst, hrsrc),
     55    return CreateDialogIndirectParamW(hInst, (LPCDLGTEMPLATEW)LoadResource(hInst, hrsrc),
    5656                                      hwndOwner, dlgproc, lParamInit);
    5757}
     
    5959//******************************************************************************
    6060HWND WIN32API CreateDialogIndirectParamA(HINSTANCE hInst,
    61                          DLGTEMPLATE *dlgtemplate,
     61                         LPCDLGTEMPLATEA dlgtemplate,
    6262                         HWND hwndParent, DLGPROC dlgproc,
    6363                         LPARAM lParamInit)
     
    8787//******************************************************************************
    8888HWND WIN32API CreateDialogIndirectParamW(HINSTANCE hInst,
    89                          DLGTEMPLATE *dlgtemplate,
     89                         LPCDLGTEMPLATEW dlgtemplate,
    9090                         HWND hwndParent, DLGPROC dlgproc,
    9191                         LPARAM lParamInit)
     
    115115//******************************************************************************
    116116INT  WIN32API DialogBoxIndirectParamA(HINSTANCE hInst,
    117                       DLGTEMPLATE *dlgtemplate,
     117                      LPCDLGTEMPLATEA dlgtemplate,
    118118                      HWND hwndParent, DLGPROC dlgproc,
    119119                      LPARAM lParamInit)
     
    136136//******************************************************************************
    137137//******************************************************************************
    138 INT  WIN32API DialogBoxIndirectParamW(HINSTANCE hInst, DLGTEMPLATE *dlgtemplate,
     138INT  WIN32API DialogBoxIndirectParamW(HINSTANCE hInst, LPCDLGTEMPLATEW dlgtemplate,
    139139                                      HWND hwndParent, DLGPROC dlgproc,
    140140                                      LPARAM lParamInit)
Note: See TracChangeset for help on using the changeset viewer.