Aug 23, 2002 #1 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
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
Aug 24, 2002 #2 TGM IS-IT--Management Joined Mar 14, 2001 Messages 141 Location BE 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 Upvote 0 Downvote
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