CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 1999
    Location
    GERMANY
    Posts
    3

    Repaint problem in IE

    The active X control which I am using only display an WMF-File. When the scroll bars are used, the active X control is not repainted properly and close grey and black horizontal lines appear. This problem occurs only while using IE 5.0 as the browser and does not occur while using IE 4.0 as the browser or ActiveX test container. Is this problem because of IE 5.0?? Or is there a way to solve this problem???

    with regards
    Stefan




  2. #2
    Join Date
    Aug 1999
    Location
    Chicago, IL
    Posts
    43

    Re: Repaint problem in IE

    I have had simular problems, and have found that for COleControls that you have to overide the following:

    DWORD CMyControl::GetControlFlags()
    {
    return COleControl::GetControlFlags() & ~(clipPaintDC | fastBeginPaint);
    }

    This is a documented BUG for VC 4.1 , 4.2, 5.0.





  3. #3
    Join Date
    Aug 1999
    Location
    GERMANY
    Posts
    3

    Re: Repaint problem in IE

    I have solved it too. there is an documented bug in IE To solve it you must override an OnPaint method like this:

    CPaintDC dc(this); // device context for painting
    int cliprgnrect;
    CRect rcClientRgn;
    HRGN hrgnClipOut;

    GetOuterWindow()->GetClientRect(&rcClientRgn);
    hrgnClipOut = ::CreateRectRgn( rcClientRgn.left, rcClientRgn.top,rcClientRgn.right,rcClientRgn.bottom);

    cliprgnrect = ::SetWindowRgn(GetOuterWindow()->m_hWnd, hrgnClipOut, TRUE);
    COleControl::OnPaint(&dc);

    You can find it on MSDN Q233391

    with regards



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured