Changeset 1256 for trunk/src


Ignore:
Timestamp:
Oct 12, 1999, 4:47:24 PM (26 years ago)
Author:
sandervl
Message:

MDI fix, extra message support etc

Location:
trunk/src/user32
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/Makefile

    r1231 r1256  
    1 # $Id: Makefile,v 1.28 1999-10-09 18:16:56 sandervl Exp $
     1# $Id: Makefile,v 1.29 1999-10-12 14:47:21 sandervl Exp $
    22
    33#
     
    7373hooks.obj: hooks.cpp hooks.h
    7474initterm.obj: initterm.cpp $(PDWIN32_INCLUDE)\spy.h pmwindow.h heapshared.h
    75 uitools.obj: uitools.cpp
     75uitools.obj: uitools.cpp win32wbase.h
    7676unknown.obj: unknown.cpp
    7777wndmsg.obj: wndmsg.cpp wndmsg.h
  • trunk/src/user32/oslibwin.cpp

    r1253 r1256  
    1 /* $Id: oslibwin.cpp,v 1.21 1999-10-11 20:54:24 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.22 1999-10-12 14:47:22 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    4848 HWND  hwndClient;
    4949
    50   dprintf(("WinCreateWindow %x %x %x %s", hwndParent, dwWinStyle, dwFrameStyle, pszName));
     50  if(dwFrameStyle)
     51        dprintf(("FRAME:    WinCreateWindow %x %x %x %s", hwndParent, dwWinStyle, dwFrameStyle, pszName));
     52  else  dprintf(("WinCreateWindow %x %x %x %s", hwndParent, dwWinStyle, dwFrameStyle, pszName));
    5153
    5254  if(pszName && *pszName == 0) {
     
    8082                return hwndClient;
    8183        }
    82         dprintf(("OSLibWinCreateWindow: WinCreateStdWindow failed (%x)", WinGetLastError(GetThreadHAB())));
     84        dprintf(("OSLibWinCreateWindow: (FRAME) WinCreateStdWindow failed (%x)", WinGetLastError(GetThreadHAB())));
    8385        return 0;
    8486  }
  • trunk/src/user32/pmwindow.cpp

    r1227 r1256  
    1 /* $Id: pmwindow.cpp,v 1.24 1999-10-09 15:36:58 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.25 1999-10-12 14:47:22 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    183183  }
    184184  if(msg > WIN32APP_USERMSGBASE) {
    185     //win32 app user message
    186     dprintf(("PMWINDOW: Message %x (%x,%x) posted to window %x", (ULONG)msg-WIN32APP_USERMSGBASE, mp1, mp2, hwnd));
    187         win32wnd->SendMessageA((ULONG)msg-WIN32APP_USERMSGBASE, (ULONG)mp1, (ULONG)mp2);
     185        //win32 app user message
     186        return (MRESULT)win32wnd->SendMessageA((ULONG)msg-WIN32APP_USERMSGBASE, (ULONG)mp1, (ULONG)mp2);
    188187  }
    189188  switch( msg )
     
    574573
    575574        //OS/2 Window coordinates -> Win32 Window coordinates
    576         //NOTE: Do not call the default OS/2 window handler as that one changes
    577         //      the mousepointer!
    578         win32wnd->MsgMouseMove(keystate, SHORT1FROMMP(mp1), MapOS2ToWin32Y(win32wnd, SHORT2FROMMP(mp1)));
     575        if(win32wnd->MsgMouseMove(keystate, SHORT1FROMMP(mp1), MapOS2ToWin32Y(win32wnd, SHORT2FROMMP(mp1))))
     576    {
     577        //Changes mouse cursor to default
     578            goto RunDefWndProc;
     579    }
    579580        break;
    580581    }
  • trunk/src/user32/uitools.cpp

    r1243 r1256  
    1 /* $Id: uitools.cpp,v 1.12 1999-10-10 11:26:34 cbratschi Exp $ */
     1/* $Id: uitools.cpp,v 1.13 1999-10-12 14:47:22 sandervl Exp $ */
    22/*
    33 * User Interface Functions
     
    1414#include "winuser.h"
    1515#include "user32.h"
     16#include "win32wbase.h"
    1617
    1718static const WORD wPattern_AA55[8] = { 0xaaaa, 0x5555, 0xaaaa, 0x5555,
     
    17811782//******************************************************************************
    17821783//******************************************************************************
    1783 BOOL WIN32API DrawMenuBar( HWND arg1)
    1784 {
    1785 #ifdef DEBUG
    1786     WriteLog("USER32:  DrawMenuBar\n");
    1787 #endif
    1788     return O32_DrawMenuBar(arg1);
     1784BOOL WIN32API DrawMenuBar(HWND hwnd)
     1785{
     1786 Win32BaseWindow *window;
     1787
     1788    window = Win32BaseWindow::GetWindowFromHandle(hwnd);
     1789    if(!window) {
     1790        dprintf(("DrawMenuBar, window %x not found", hwnd));
     1791        SetLastError(ERROR_INVALID_WINDOW_HANDLE);
     1792        return 0;
     1793    }
     1794    dprintf(("DrawMenuBar\n"));
     1795    return O32_DrawMenuBar(window->getOS2FrameWindowHandle());
    17891796}
    17901797//******************************************************************************
     
    20322039      INT  nLen;
    20332040
    2034       nLen = O32_GetWindowText (hwnd,
     2041      nLen = O32_GetWindowText (Win32BaseWindow::Win32ToOS2FrameHandle(hwnd),
    20352042                                szText,
    20362043                                128);
  • trunk/src/user32/win32wbase.cpp

    r1253 r1256  
    1 /* $Id: win32wbase.cpp,v 1.36 1999-10-11 20:54:25 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.37 1999-10-12 14:47:23 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    5858    !(style & (WS_CHILD | WS_POPUP))
    5959
     60/* bits in the dwKeyData */
     61#define KEYDATA_ALT         0x2000
     62#define KEYDATA_PREVSTATE   0x4000
     63
    6064void PrintWindowStyle(DWORD dwStyle, DWORD dwExStyle);
    6165
     
    551555
    552556  //Subclass frame
    553   if (isFrameWindow())
     557  if (isFrameWindow() && HAS_3DFRAME(dwExStyle))
    554558  {
    555559    pOldFrameProc = FrameSubclassFrameWindow(this);
     
    10861090                                                    // bit 24, 1=extended key
    10871091                                                    // bit 25-28, reserved
    1088     lParam |= 0 << 29;                              // bit 29, key is released, always 0 for WM_KEYUP ?? <- conflict according to the MS docs
     1092    lParam |= 0 << 29;                              // bit 29, key is released, always 1 for WM_SYSKEYUP ?? <- conflict according to the MS docs
    10891093    lParam |= 1 << 30;                              // bit 30, previous state, always 1 for a WM_KEYUP message
    10901094    lParam |= 1 << 31;                              // bit 31, transition state, always 1 for WM_KEYUP
     
    11051109                                                    // bit 24, 1=extended key
    11061110                                                    // bit 25-28, reserved
    1107                                                     // bit 29, key is pressed, always 0 for WM_KEYDOWN ?? <- conflict according to the MS docs
     1111                                            // bit 29, key is released, always 1 for WM_SYSKEYUP ?? <- conflict according to the MS docs
    11081112    if (keyWasPressed)
    11091113        lParam |= 1 << 30;                          // bit 30, previous state, 1 means key was pressed
     
    14451449    return infoPtr->CurVal;
    14461450}
     1451/***********************************************************************
     1452 *           NC_HandleSysCommand
     1453 *
     1454 * Handle a WM_SYSCOMMAND message. Called from DefWindowProc().
     1455 *
     1456 * TODO: Not done (see #if 0)
     1457 */
     1458LONG Win32BaseWindow::HandleSysCommand(WPARAM wParam, POINT *pt32)
     1459{
     1460    UINT uCommand = wParam & 0xFFF0;
     1461
     1462    if (getStyle() & WS_CHILD && uCommand != SC_KEYMENU )
     1463        ScreenToClient(getParent()->getWindowHandle(), pt32 );
     1464
     1465    switch (uCommand)
     1466    {
     1467#if 0
     1468    case SC_SIZE:
     1469    case SC_MOVE:
     1470        NC_DoSizeMove( hwnd, wParam );
     1471        break;
     1472#endif
     1473
     1474    case SC_MINIMIZE:
     1475        ShowWindow(SW_MINIMIZE);
     1476        break;
     1477
     1478    case SC_MAXIMIZE:
     1479        ShowWindow(SW_MAXIMIZE);
     1480        break;
     1481
     1482    case SC_RESTORE:
     1483        ShowWindow(SW_RESTORE);
     1484        break;
     1485
     1486    case SC_CLOSE:
     1487        return SendMessageA(WM_CLOSE, 0, 0);
     1488
     1489#if 0
     1490    case SC_VSCROLL:
     1491    case SC_HSCROLL:
     1492        NC_TrackScrollBar( hwnd, wParam, pt32 );
     1493        break;
     1494
     1495    case SC_MOUSEMENU:
     1496        MENU_TrackMouseMenuBar( wndPtr, wParam & 0x000F, pt32 );
     1497        break;
     1498
     1499    case SC_KEYMENU:
     1500        MENU_TrackKbdMenuBar( wndPtr , wParam , pt.x );
     1501        break;
     1502
     1503    case SC_TASKLIST:
     1504        WinExec( "taskman.exe", SW_SHOWNORMAL );
     1505        break;
     1506
     1507    case SC_SCREENSAVE:
     1508        if (wParam == SC_ABOUTWINE)
     1509            ShellAboutA(hwnd, "Odin", WINE_RELEASE_INFO, 0);
     1510        else
     1511        if (wParam == SC_PUTMARK)
     1512            dprintf(("Mark requested by user\n"));
     1513        break;
     1514
     1515    case SC_HOTKEY:
     1516    case SC_ARRANGE:
     1517    case SC_NEXTWINDOW:
     1518    case SC_PREVWINDOW:
     1519        break;
     1520#endif
     1521    }
     1522    return 0;
     1523}
    14471524//******************************************************************************
    14481525//******************************************************************************
     
    15781655    }
    15791656    case WM_MOUSEMOVE:
    1580         return 0;
     1657        return 1; //Let OS/2 change the mouse cursor back to the default
    15811658
    15821659    case WM_WINDOWPOSCHANGED:
     
    16341711        return HTCLIENT;
    16351712
    1636 #if 0
     1713    case WM_SYSCOMMAND:
     1714    {
     1715     POINT point;
     1716
     1717        point.x = LOWORD(lParam);
     1718        point.y = HIWORD(lParam);
     1719        return HandleSysCommand(wParam, &point);
     1720    }
     1721
    16371722    case WM_SYSKEYDOWN:
    16381723        if(HIWORD(lParam) & KEYDATA_ALT)
     
    16401725            if(wParam == VK_F4) /* try to close the window */
    16411726            {
    1642                 HWND hWnd = WIN_GetTopParent( wndPtr->hwndSelf );
    1643                 wndPtr = WIN_FindWndPtr( hWnd );
    1644                 if( wndPtr && !(getClass()->getStyle() & CS_NOCLOSE) )
    1645                     PostMessage(WM_SYSCOMMAND, SC_CLOSE, 0);
     1727                Win32BaseWindow *window = GetTopParent();
     1728                if(window && !(window->getClass()->getStyle() & CS_NOCLOSE) )
     1729                    window->PostMessageA(WM_SYSCOMMAND, SC_CLOSE, 0);
    16461730            }
    16471731        }
    16481732        return 0;
    1649 #endif
     1733
     1734    case WM_QUERYOPEN:
     1735    case WM_QUERYENDSESSION:
     1736        return 1;
     1737
     1738    case WM_NOTIFYFORMAT:
     1739        if (IsUnicode()) return NFR_UNICODE;
     1740        else return NFR_ANSI;
     1741
     1742    case WM_SETICON:
     1743    case WM_GETICON:
     1744    {
     1745            LRESULT result = 0;
     1746            int index = GCL_HICON;
     1747
     1748            if (wParam == ICON_SMALL)
     1749                index = GCL_HICONSM;
     1750
     1751            result = windowClass->getClassLongA(index);
     1752
     1753            if (Msg == WM_SETICON)
     1754                windowClass->setClassLongA(index, lParam);
     1755
     1756            return result;
     1757    }
    16501758
    16511759    default:
     
    19742082 ULONG showstate = 0;
    19752083
    1976     dprintf(("ShowWindow %x", nCmdShow));
     2084    dprintf(("ShowWindow %x %x", getWindowHandle(), nCmdShow));
    19772085    if(fFirstShow) {
    19782086        if(isFrameWindow() && IS_OVERLAPPED(getStyle()) && !isChild()) {
     
    20192127        break;
    20202128    }
     2129
    20212130    BOOL rc = OSLibWinShowWindow(OS2HwndFrame, showstate);
    20222131    return rc;
     
    21562265BOOL Win32BaseWindow::IsChild(HWND hwndParent)
    21572266{
    2158   if(getParent()) {
     2267    if(getParent()) {
    21592268        return getParent()->getWindowHandle() == hwndParent;
    2160   }
    2161   else  return 0;
     2269    }
     2270    else  return 0;
    21622271}
    21632272//******************************************************************************
     
    21652274HWND Win32BaseWindow::GetTopWindow()
    21662275{
    2167   return GetWindow(GW_CHILD);
     2276    return GetWindow(GW_CHILD);
     2277}
     2278//******************************************************************************
     2279// Get the top-level parent for a child window.
     2280//******************************************************************************
     2281Win32BaseWindow *Win32BaseWindow::GetTopParent()
     2282{
     2283 Win32BaseWindow *window = this;
     2284
     2285    while(window && (window->getStyle() & WS_CHILD))
     2286    {
     2287        window = window->getParent();
     2288    }
     2289    return window;
    21682290}
    21692291//******************************************************************************
     
    26162738Win32BaseWindow *Win32BaseWindow::GetWindowFromOS2FrameHandle(HWND hwnd)
    26172739{
    2618   return GetWindowFromOS2Handle(OSLibWinWindowFromID(hwnd,OSLIB_FID_CLIENT));
     2740    return GetWindowFromOS2Handle(OSLibWinWindowFromID(hwnd,OSLIB_FID_CLIENT));
    26192741}
    26202742//******************************************************************************
     
    26222744HWND Win32BaseWindow::Win32ToOS2Handle(HWND hwnd)
    26232745{
    2624         Win32BaseWindow *window = GetWindowFromHandle(hwnd);
    2625 
    2626         if(window) {
    2627                 return window->getOS2WindowHandle();
    2628         }
    2629         else  return hwnd;    //OS/2 window handle
     2746    Win32BaseWindow *window = GetWindowFromHandle(hwnd);
     2747
     2748    if(window) {
     2749            return window->getOS2WindowHandle();
     2750    }
     2751    else    return hwnd;
     2752}
     2753//******************************************************************************
     2754//******************************************************************************
     2755HWND Win32BaseWindow::Win32ToOS2FrameHandle(HWND hwnd)
     2756{
     2757    Win32BaseWindow *window = GetWindowFromHandle(hwnd);
     2758
     2759    if(window) {
     2760            return window->getOS2FrameWindowHandle();
     2761    }
     2762    else    return hwnd;
    26302763}
    26312764//******************************************************************************
     
    26332766HWND Win32BaseWindow::OS2ToWin32Handle(HWND hwnd)
    26342767{
    2635         Win32BaseWindow *window = GetWindowFromOS2Handle(hwnd);
    2636 
    2637         if(window) {
    2638                 return window->getWindowHandle();
    2639         }
    2640         window = GetWindowFromOS2FrameHandle(hwnd);
    2641         if(window) {
    2642                 return window->getWindowHandle();
    2643         }
    2644         else    return hwnd;    //OS/2 window handle
     2768    Win32BaseWindow *window = GetWindowFromOS2Handle(hwnd);
     2769
     2770    if(window) {
     2771            return window->getWindowHandle();
     2772    }
     2773    window = GetWindowFromOS2FrameHandle(hwnd);
     2774    if(window) {
     2775            return window->getWindowHandle();
     2776    }
     2777    else    return hwnd;    //OS/2 window handle
    26452778}
    26462779//******************************************************************************
     
    26522785 char exstyle[256] = "";
    26532786
    2654   /* Window styles */
    2655   if(dwStyle & WS_CHILD)
     2787    /* Window styles */
     2788    if(dwStyle & WS_CHILD)
    26562789        strcat(style, "WS_CHILD ");
    2657   if(dwStyle & WS_POPUP)
     2790    if(dwStyle & WS_POPUP)
    26582791        strcat(style, "WS_POPUP ");
    2659   if(dwStyle & WS_VISIBLE)
     2792    if(dwStyle & WS_VISIBLE)
    26602793        strcat(style, "WS_VISIBLE ");
    2661   if(dwStyle & WS_DISABLED)
     2794    if(dwStyle & WS_DISABLED)
    26622795        strcat(style, "WS_DISABLED ");
    2663   if(dwStyle & WS_CLIPSIBLINGS)
     2796    if(dwStyle & WS_CLIPSIBLINGS)
    26642797        strcat(style, "WS_CLIPSIBLINGS ");
    2665   if(dwStyle & WS_CLIPCHILDREN)
     2798    if(dwStyle & WS_CLIPCHILDREN)
    26662799        strcat(style, "WS_CLIPCHILDREN ");
    2667   if(dwStyle & WS_MAXIMIZE)
     2800    if(dwStyle & WS_MAXIMIZE)
    26682801        strcat(style, "WS_MAXIMIZE ");
    2669   if(dwStyle & WS_MINIMIZE)
     2802    if(dwStyle & WS_MINIMIZE)
    26702803        strcat(style, "WS_MINIMIZE ");
    2671   if(dwStyle & WS_GROUP)
     2804    if(dwStyle & WS_GROUP)
    26722805        strcat(style, "WS_GROUP ");
    2673   if(dwStyle & WS_TABSTOP)
     2806    if(dwStyle & WS_TABSTOP)
    26742807        strcat(style, "WS_TABSTOP ");
    26752808
    2676   if((dwStyle & WS_CAPTION) == WS_CAPTION)
     2809    if((dwStyle & WS_CAPTION) == WS_CAPTION)
    26772810        strcat(style, "WS_CAPTION ");
    2678   if(dwStyle & WS_DLGFRAME)
     2811    if(dwStyle & WS_DLGFRAME)
    26792812        strcat(style, "WS_DLGFRAME ");
    2680   if(dwStyle & WS_BORDER)
     2813    if(dwStyle & WS_BORDER)
    26812814        strcat(style, "WS_BORDER ");
    26822815
    2683   if(dwStyle & WS_VSCROLL)
     2816    if(dwStyle & WS_VSCROLL)
    26842817        strcat(style, "WS_VSCROLL ");
    2685   if(dwStyle & WS_HSCROLL)
     2818    if(dwStyle & WS_HSCROLL)
    26862819        strcat(style, "WS_HSCROLL ");
    2687   if(dwStyle & WS_SYSMENU)
     2820    if(dwStyle & WS_SYSMENU)
    26882821        strcat(style, "WS_SYSMENU ");
    2689   if(dwStyle & WS_THICKFRAME)
     2822    if(dwStyle & WS_THICKFRAME)
    26902823        strcat(style, "WS_THICKFRAME ");
    2691   if(dwStyle & WS_MINIMIZEBOX)
     2824    if(dwStyle & WS_MINIMIZEBOX)
    26922825        strcat(style, "WS_MINIMIZEBOX ");
    2693   if(dwStyle & WS_MAXIMIZEBOX)
     2826    if(dwStyle & WS_MAXIMIZEBOX)
    26942827        strcat(style, "WS_MAXIMIZEBOX ");
    26952828
    2696   if(dwExStyle & WS_EX_DLGMODALFRAME)
     2829    if(dwExStyle & WS_EX_DLGMODALFRAME)
    26972830        strcat(exstyle, "WS_EX_DLGMODALFRAME ");
    2698   if(dwExStyle & WS_EX_ACCEPTFILES)
     2831    if(dwExStyle & WS_EX_ACCEPTFILES)
    26992832        strcat(exstyle, "WS_EX_ACCEPTFILES ");
    2700   if(dwExStyle & WS_EX_NOPARENTNOTIFY)
     2833    if(dwExStyle & WS_EX_NOPARENTNOTIFY)
    27012834        strcat(exstyle, "WS_EX_NOPARENTNOTIFY ");
    2702   if(dwExStyle & WS_EX_TOPMOST)
     2835    if(dwExStyle & WS_EX_TOPMOST)
    27032836        strcat(exstyle, "WS_EX_TOPMOST ");
    2704   if(dwExStyle & WS_EX_TRANSPARENT)
     2837    if(dwExStyle & WS_EX_TRANSPARENT)
    27052838        strcat(exstyle, "WS_EX_TRANSPARENT ");
    27062839
    2707   if(dwExStyle & WS_EX_MDICHILD)
     2840    if(dwExStyle & WS_EX_MDICHILD)
    27082841        strcat(exstyle, "WS_EX_MDICHILD ");
    2709   if(dwExStyle & WS_EX_TOOLWINDOW)
     2842    if(dwExStyle & WS_EX_TOOLWINDOW)
    27102843        strcat(exstyle, "WS_EX_TOOLWINDOW ");
    2711   if(dwExStyle & WS_EX_WINDOWEDGE)
     2844    if(dwExStyle & WS_EX_WINDOWEDGE)
    27122845        strcat(exstyle, "WS_EX_WINDOWEDGE ");
    2713   if(dwExStyle & WS_EX_CLIENTEDGE)
     2846    if(dwExStyle & WS_EX_CLIENTEDGE)
    27142847        strcat(exstyle, "WS_EX_CLIENTEDGE ");
    2715   if(dwExStyle & WS_EX_CONTEXTHELP)
     2848    if(dwExStyle & WS_EX_CONTEXTHELP)
    27162849        strcat(exstyle, "WS_EX_CONTEXTHELP ");
    2717   if(dwExStyle & WS_EX_RIGHT)
     2850    if(dwExStyle & WS_EX_RIGHT)
    27182851        strcat(exstyle, "WS_EX_RIGHT ");
    2719   if(dwExStyle & WS_EX_LEFT)
     2852    if(dwExStyle & WS_EX_LEFT)
    27202853        strcat(exstyle, "WS_EX_LEFT ");
    2721   if(dwExStyle & WS_EX_RTLREADING)
     2854    if(dwExStyle & WS_EX_RTLREADING)
    27222855        strcat(exstyle, "WS_EX_RTLREADING ");
    2723   if(dwExStyle & WS_EX_LTRREADING)
     2856    if(dwExStyle & WS_EX_LTRREADING)
    27242857        strcat(exstyle, "WS_EX_LTRREADING ");
    2725   if(dwExStyle & WS_EX_LEFTSCROLLBAR)
     2858    if(dwExStyle & WS_EX_LEFTSCROLLBAR)
    27262859        strcat(exstyle, "WS_EX_LEFTSCROLLBAR ");
    2727   if(dwExStyle & WS_EX_RIGHTSCROLLBAR)
     2860    if(dwExStyle & WS_EX_RIGHTSCROLLBAR)
    27282861        strcat(exstyle, "WS_EX_RIGHTSCROLLBAR ");
    2729   if(dwExStyle & WS_EX_CONTROLPARENT)
     2862    if(dwExStyle & WS_EX_CONTROLPARENT)
    27302863        strcat(exstyle, "WS_EX_CONTROLPARENT ");
    2731   if(dwExStyle & WS_EX_STATICEDGE)
     2864    if(dwExStyle & WS_EX_STATICEDGE)
    27322865        strcat(exstyle, "WS_EX_STATICEDGE ");
    2733   if(dwExStyle & WS_EX_APPWINDOW)
     2866    if(dwExStyle & WS_EX_APPWINDOW)
    27342867        strcat(exstyle, "WS_EX_APPWINDOW ");
    27352868
    2736   dprintf(("Window style:   %x %s", dwStyle, style));
    2737   dprintf(("Window exStyle: %x %s", dwExStyle, exstyle));
     2869    dprintf(("Window style:   %x %s", dwStyle, style));
     2870    dprintf(("Window exStyle: %x %s", dwExStyle, exstyle));
    27382871}
    27392872#endif
  • trunk/src/user32/win32wbase.h

    r1255 r1256  
    1 /* $Id: win32wbase.h,v 1.19 1999-10-11 20:57:08 sandervl Exp $ */
     1/* $Id: win32wbase.h,v 1.20 1999-10-12 14:47:24 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    152152         BOOL   IsChild(HWND hwndParent);
    153153         HWND   GetTopWindow();
     154Win32BaseWindow *GetTopParent();
    154155         BOOL   UpdateWindow();
    155156         BOOL   IsIconic();
     
    197198
    198199    static HWND Win32ToOS2Handle(HWND hwnd);
     200    static HWND Win32ToOS2FrameHandle(HWND hwnd);
    199201    static HWND OS2ToWin32Handle(HWND hwnd);
    200202
     
    277279#ifndef OS2_INCLUDED
    278280        void  GetMinMaxInfo(POINT *maxSize, POINT *maxPos, POINT *minTrack, POINT *maxTrack );
     281        LONG  HandleSysCommand(WPARAM wParam, POINT *pt32);
    279282
    280283        LONG  SendNCCalcSize(BOOL calcValidRect,
  • trunk/src/user32/win32wmdichild.cpp

    r1159 r1256  
    1 /* $Id: win32wmdichild.cpp,v 1.3 1999-10-07 09:28:02 sandervl Exp $ */
     1/* $Id: win32wmdichild.cpp,v 1.4 1999-10-12 14:47:24 sandervl Exp $ */
    22/*
    33 * Win32 MDI Child Window Class for OS/2
     
    355355             * the SWP_SHOWWINDOW command.
    356356             */
    357             newchild->SetWindowLongA(GWL_STYLE, showflag & ~WS_VISIBLE);
     357//SvL: Not here. This causes problems in OS/2
     358//            newchild->SetWindowLongA(GWL_STYLE, showflag & ~WS_VISIBLE);
    358359            if(showflag){
    359360                newchild->SetWindowPos(0, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE );
  • trunk/src/user32/window.cpp

    r1253 r1256  
    1 /* $Id: window.cpp,v 1.13 1999-10-11 20:54:26 sandervl Exp $ */
     1/* $Id: window.cpp,v 1.14 1999-10-12 14:47:24 sandervl Exp $ */
    22/*
    33 * Win32 window apis for OS/2
     
    179179        window = (Win32BaseWindow *) new Win32MDIClientWindow(&cs, classAtom, TRUE);
    180180    }
     181    else
    181182    if(!lstrcmpiW(className, (LPWSTR)DIALOG_CLASS_NAMEW))
    182183    {
     
    739740{
    740741 BOOL rc;
    741 
    742 #if 1
     742 HWND hwndWin32 = hwnd;
     743
    743744    hwnd = Win32BaseWindow::Win32ToOS2Handle(hwnd);
    744745    rc = OSLibWinQueryWindowRect(hwnd, pRect);
    745     dprintf(("USER32:  GetClientRect of %X returned (%d,%d) (%d,%d)\n", hwnd, pRect->left, pRect->top, pRect->right, pRect->bottom));
     746    dprintf(("GetClientRect of %X returned (%d,%d) (%d,%d)\n", hwndWin32, pRect->left, pRect->top, pRect->right, pRect->bottom));
    746747    return rc;
    747 #else
    748    Win32BaseWindow *window;
    749 
    750     window = Win32BaseWindow::GetWindowFromHandle(hwnd);
    751     if(!window) {
    752         dprintf(("GetClientRect, window %x not found", hwnd));
    753         SetLastError(ERROR_INVALID_WINDOW_HANDLE);
    754         return 0;
    755     }
    756     *pRect = *window->getClientRect();
    757     dprintf(("GetClientRect of %X returned (%d,%d) (%d,%d)\n", hwnd, pRect->left, pRect->top, pRect->right, pRect->bottom));
    758     return TRUE;
    759 #endif
    760748}
    761749//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.