Ignore:
Timestamp:
Jun 2, 2001, 4:26:52 PM (24 years ago)
Author:
sandervl
Message:

ScrollDC fix; clip & scroll rect translation

File:
1 edited

Legend:

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

    r5835 r5882  
    1 /* $Id: dc.cpp,v 1.106 2001-05-30 08:00:29 sandervl Exp $ */
     1/* $Id: dc.cpp,v 1.107 2001-06-02 14:26:52 sandervl Exp $ */
    22
    33/*
     
    14971497    BOOL rc = TRUE;
    14981498
    1499     dprintf (("USER32: ScrollDC %x (%d,%d), %x %x %x %x", hDC, dx, dy, pScroll, pClip, hrgnUpdate, pRectUpdate));
    1500 
    15011499    if (!hDC)
    15021500    {
     1501        dprintf (("USER32: ScrollDC %x (%d,%d), %x %x %x %x -> invalid hdc", hDC, dx, dy, pScroll, pClip, hrgnUpdate, pRectUpdate));
    15031502        return (FALSE);
    15041503    }
     
    15111510    else {
    15121511        //assume (for now) that this is not allowed (TODO)
     1512        dprintf (("USER32: ScrollDC %x (%d,%d), %x %x %x %x", hDC, dx, dy, pScroll, pClip, hrgnUpdate, pRectUpdate));
    15131513        dprintf(("ScrollDC used for frame HDC!!"));
    15141514        DebugInt3();
    15151515        return FALSE;
    15161516    }
    1517 
    15181517    if((hwnd == NULLHANDLE) || !wnd)
    15191518    {
     1519        dprintf (("USER32: ScrollDC %x (%d,%d), %x %x %x %x -> invalid window handle", hDC, dx, dy, pScroll, pClip, hrgnUpdate, pRectUpdate));
    15201520        return (FALSE);
    15211521    }
    15221522
     1523    dprintf (("USER32: ScrollDC %x (hwnd %x) (%d,%d), %x %x %x %x", hDC, wnd->getWindowHandle(), dx, dy, pScroll, pClip, hrgnUpdate, pRectUpdate));
    15231524    POINTL ptl[2] = { 0, 0, dx, dy };
    15241525
     
    15321533    if (pClip)
    15331534    {
     1535        dprintf (("ScrollDC: Clip rectangle (%d,%d)(%d,%d)", pClip->left, pClip->top, pClip->right, pClip->bottom));
     1536#if 1
     1537        clipRect = *pClip;
     1538        LPtoDP(hDC, (LPPOINT)&clipRect, 2);
     1539#else
    15341540        memcpy(&clipRect, pClip, sizeof(clipRect));
    15351541
     
    15591565            clipRect.bottom  = temp;
    15601566        }
     1567#endif
    15611568    }
    15621569
    15631570    if (pScroll)
    15641571    {
     1572#if 1
     1573        dprintf (("ScrollDC: Scroll rectangle (%d,%d)(%d,%d)", pScroll->left, pScroll->top, pScroll->right, pScroll->bottom));
     1574        scrollRect = *pScroll;
     1575        LPtoDP(hDC, (LPPOINT)&scrollRect, 2);
     1576#else
    15651577        memcpy(&scrollRect, pScroll, sizeof(scrollRect));
    15661578
     
    15901602            scrollRect.bottom = temp;
    15911603        }
     1604#endif
    15921605    }
    15931606    RECTL  rectlUpdate;
     
    16021615        mapWin32ToOS2Rect(wnd->getClientHeight(), &scrollRect, (PRECTLOS2)&scrollOS2);
    16031616        pScrollOS2 = &scrollOS2;
     1617        dprintf2(("ScrollDC: PM Scroll rectangle (%d,%d)(%d,%d)", pScrollOS2->xLeft, pScrollOS2->yBottom, pScrollOS2->xRight, pScrollOS2->yTop));
    16041618    }
    16051619
     
    16071621        mapWin32ToOS2Rect(wnd->getClientHeight(), &clipRect, (PRECTLOS2)&clipOS2);
    16081622        pClipOS2 = &clipOS2;
     1623        dprintf2(("ScrollDC: PM Clip rectangle (%d,%d)(%d,%d)", pClipOS2->xLeft, pClipOS2->yBottom, pClipOS2->xRight, pClipOS2->yTop));
    16091624    }
    16101625
     
    16201635    if (lComplexity == RGN_ERROR)
    16211636    {
     1637        dprintf(("ScrollDC: lComplexity == RGN_ERROR" ));
    16221638        return (FALSE);
    16231639    }
     
    16251641    RECT winRectUpdate;
    16261642
     1643    dprintf2(("ScrollDC: PM Update rectangle (%d,%d)(%d,%d)", rectlUpdate.xLeft, rectlUpdate.yBottom, rectlUpdate.xRight, rectlUpdate.yTop));
     1644
    16271645    mapOS2ToWin32Rect(wnd->getClientHeight(), (PRECTLOS2)&rectlUpdate, &winRectUpdate);
     1646
     1647    dprintf2(("ScrollDC: Update rectangle (%d,%d)(%d,%d)", winRectUpdate.left, winRectUpdate.top, winRectUpdate.right, winRectUpdate.bottom));
    16281648
    16291649    if (pRectUpdate)
Note: See TracChangeset for help on using the changeset viewer.