Link to home
Start Free TrialLog in
Avatar of smithc
smithc

asked on

folloup to color question

I changed the background in my view in the OnPrepareDC function.This is the code I use:
CBrush Br(RGB(0,0,0));
CRect rcBounds;
 pDC->GetClipBox(&rcBounds);
 CBrush* pOldBrush = pDC->SelectObject(&Br);
 pDC->PatBlt(rcBounds.left, rcBounds.top, rcBounds.Width(), rcBounds.Height(),PATCOPY);
 pDC->SelectObject(pOldBrush);
COLORREF crBk = pDC->GetBkColor();
pDC->SetBkColor(RGB(0,0,0));
COLORREF crTxt = pDC->GetTextColor();
pDC->SetTextColor(RGB(255,0,0));

The problem is when I scroll, I see white flashes come across the screen, as if the view is being redrawn in white, before being drawn as black. Any idea what this may be? Where is it being drawn in white?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Tommy Hui
Tommy Hui

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of smithc
smithc

ASKER

thanks