Hi,
FloodFill is not working. I am using Visual C 6.0 in windows 7 environment. Its not filling a triangle.
My code is:
Somebody plz guide me. Its an urgent problem.Code:
void CFloodFillExView::OnDraw(CDC* pDC)
{
CFloodFillExDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
CPoint Pt[7];
Pt[0] = CPoint(300, 400);
Pt[1] = CPoint(200, 300);
Pt[2] = CPoint(600, 400);
pDC->Polygon(Pt, 3);
pDC->SetPixel(400, 390, RGB(0,0,0));
CBrush brSYell(RGB(0,0,0));
CBrush* pOldBrush=NULL;
pOldBrush=pDC->SelectObject(&brSYell);
//select the new pen
//Now Draw a triangle
pDC->FloodFill(400, 350, RGB(0,0,0));
pDC->SelectObject(pOldBrush);
}
Zulfi.