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(pOldBrus h);
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
CBrush Br(RGB(0,0,0));
CRect rcBounds;
pDC->GetClipBox(&rcBounds)
CBrush* pOldBrush = pDC->SelectObject(&Br);
pDC->PatBlt(rcBounds.left,
pDC->SelectObject(pOldBrus
COLORREF crBk = pDC->GetBkColor();
pDC->SetBkColor(RGB(0,0,0)
COLORREF crTxt = pDC->GetTextColor();
pDC->SetTextColor(RGB(255,
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER