1
votes

I have a CDialog and inside the Dialog there is a CWnd which contain a scroll bar. I wrote a function to handle scroll. When I do a scroll the items are blurred and duplicated. But when I minimize and open it again all seems ok. What would be the reason for this??..

Blurred Image

After Minimize and open again

1
It's difficult to say anything without more information. Show us some more code. May be it's an OnEraseBakgnd issue.Jabberwocky

1 Answers

1
votes

It worked after I override the OnPaint() method.

void MyWnd::OnPaint()
{
    CPaintDC oDC(this);

    CRect oRect;
    GetClientRect(oRect);
    CBrush oBrush(RGB(255, 255, 255));

    oDC.FillRect(oRect, &oBrush);

}