Ignore:
Timestamp:
Sep 25, 1999, 11:27:08 AM (26 years ago)
Author:
dengert
Message:

fixed ClientToScreen adn ScreenToClient

File:
1 edited

Legend:

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

    r1005 r1039  
    1 /* $Id: pmwindow.cpp,v 1.5 1999-09-22 08:58:35 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.6 1999-09-25 09:27:07 dengert Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    7777     (PSZ)WIN32_STDCLASS,               /* Window class name            */
    7878     (PFNWP)Win32WindowProc,            /* Address of window procedure  */
    79      CS_SIZEREDRAW | CS_HITTEST,
     79     CS_SIZEREDRAW | CS_HITTEST | CS_MOVENOTIFY,
    8080     NROF_WIN32WNDBYTES)) {
    8181        dprintf(("WinRegisterClass Win32BaseWindow failed"));
     
    269269            win32wnd->setEraseBkgnd (!erased, !erased);
    270270        }
     271        break;
     272    }
     273
     274    case WM_MOVE:
     275    {
     276        if (!win32wnd->isFrameWindow()) break;
     277
     278        HWND      hFrame = win32wnd->getOS2FrameWindowHandle();
     279        SWP       swp, swpo;
     280        WINDOWPOS wp;
     281        ULONG     parentHeight = 0;
     282        RECTL     rcl;
     283
     284        WinQueryWindowRect (hwnd, &rcl);
     285        WinMapWindowPoints (hwnd, hFrame, (PPOINTL)&rcl, 2);
     286        swp.x  = swpo.x  = rcl.xLeft;
     287        swp.y  = swpo.y  = rcl.yBottom;
     288        swp.cx = swpo.cx = rcl.xRight - rcl.xLeft;
     289        swp.cy = swpo.cy = rcl.yTop   - rcl.yBottom;
     290        swp.fl = SWP_MOVE | SWP_NOREDRAW;
     291        swp.hwnd             = hwnd;
     292        swp.hwndInsertBehind = NULLHANDLE;
     293
     294        OSLibMapSWPtoWINDOWPOS(&swp, &wp, &swpo, NULLHANDLE, hFrame);
     295
     296        wp.flags &= ~SWP_NOMOVE_W;
     297        wp.hwnd = win32wnd->getWindowHandle();
     298        win32wnd->setWindowRect(wp.x, wp.y, wp.x + wp.cx, wp.y + wp.cy);
     299        win32wnd->setClientRect(swpo.x, swpo.y, swpo.x + swpo.cx, swpo.y + swpo.cy);
     300        win32wnd->MsgPosChanged((LPARAM)&wp);
    271301        break;
    272302    }
Note: See TracChangeset for help on using the changeset viewer.