Ignore:
Timestamp:
Oct 14, 1999, 11:22:43 AM (26 years ago)
Author:
sandervl
Message:

Window creation rewrite + bugfixes. NOT WORKING CORRECTLY YET..

File:
1 edited

Legend:

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

    r1256 r1281  
    1 /* $Id: pmwindow.cpp,v 1.25 1999-10-12 14:47:22 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.26 1999-10-14 09:22:40 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    168168MRESULT EXPENTRY Win32WindowProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    169169{
    170  POSTMSG_PACKET *postmsg;
    171  OSLIBPOINT      point, ClientPoint;
    172  Win32BaseWindow    *win32wnd;
    173  APIRET          rc;
     170 POSTMSG_PACKET  *postmsg;
     171 OSLIBPOINT       point, ClientPoint;
     172 Win32BaseWindow *win32wnd;
     173 APIRET           rc;
    174174
    175175  //Restore our FS selector
     
    190190    //OS/2 msgs
    191191    case WM_CREATE:
     192    {
     193     THDB *thdb = GetThreadTHDB();
     194
     195        if(thdb == NULL || thdb->newWindow == 0)
     196            goto createfail;
     197
    192198        //Processing is done in after WinCreateWindow returns
    193199        dprintf(("OS2: WM_CREATE %x", hwnd));
     200        win32wnd = (Win32BaseWindow *)thdb->newWindow;
     201
     202        if(win32wnd->MsgCreate(WinQueryWindow(hwnd, QW_PARENT), hwnd) == FALSE)
     203        {
     204            delete win32wnd;
     205            RestoreOS2TIB();
     206            return (MRESULT)TRUE; //discontinue window creation
     207        }
     208    createfail:
    194209        RestoreOS2TIB();
    195210        return (MRESULT)FALSE;
     211    }
    196212
    197213    case WM_QUIT:
     
    285301        }
    286302        OSLibMapSWPtoWINDOWPOS(pswp, &wp, pswpo, hParent, hFrame);
     303
     304        SWP swpFrame;
     305        WinQueryWindowPos(win32wnd->getOS2FrameWindowHandle(), &swpFrame);
     306        dprintf(("WINDOWPOSCHANGE %x %x %x (%d,%d) (%d,%d)", win32wnd->getWindowHandle(), win32wnd->getOS2FrameWindowHandle(),
     307                         swpFrame.fl,swpFrame.x, swpFrame.y, swpFrame.cx, swpFrame.cy));
     308
     309        RECTL rect;
     310        WinQueryWindowRect(win32wnd->getOS2FrameWindowHandle(), &rect);
     311        dprintf(("WINDOWPOSCHANGE %x %x (%d,%d) (%d,%d)", win32wnd->getWindowHandle(), win32wnd->getOS2FrameWindowHandle(),
     312                         rect.xLeft, rect.yBottom, rect.xRight, rect.yTop));
    287313
    288314        win32wnd->setWindowRect(wp.x, wp.y, wp.x + wp.cx, wp.y + wp.cy);
Note: See TracChangeset for help on using the changeset viewer.