Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Help

Status
Not open for further replies.

BlackDaimond

Programmer
Joined
Aug 16, 2002
Messages
8
Location
SD
when we create a new project SDI, the color of the CView is white and I want to put it black!!
how can I do??
thinkx a lot
[afro][morning]
 
Hi

In the override of OnDraw, add this code:

void CFooView::OnDraw(CDC* pDC)
{
CTestcolorDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);

CRect rcInvalid;

// Redraw Only Invalidated Area

pDC->GetClipBox( rcInvalid);

// Paint Background

CBrush brush;

if ( !brush.CreateSolidBrush( RGB(192,192,192)))
return;

brush.UnrealizeObject();

pDC->FillRect( rcInvalid, &brush);
}

HTH

Thierry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top