   Floodfill problem
  hey, ive got the follwing code, basically it draws a castle using vc++ not mfc. Anyway code is as follows.(btw, thats not full code just look at the last bit the floodfill part) . . .pDC->MoveTo((int)newcofs[37][0],(int)newcofs[37][1]);pDC->LineTo((int)newcofs[43][0],(int)newcofs[43][1]);pDC->MoveTo((int)newcofs[38][0],(int)newcofs[38][1]);pDC->LineTo((int)newcofs[43][0],(int)newcofs[43][1]);pDC->MoveTo((int)newcofs[39][0],(int)newcofs[39][1]);pDC->LineTo((int)newcofs[43][0],(int)newcofs[43][1]);pDC->MoveTo((int)newcofs[40][0],(int)newcofs[40][1]);pDC->LineTo((int)newcofs[43][0],(int)newcofs[43][1]);pDC->MoveTo((int)newcofs[41][0],(int)newcofs[41][1]);pDC->LineTo((int)newcofs[43][0],(int)newcofs[43][1]);pDC->MoveTo((int)newcofs[42][0],(int)newcofs[42][1]);pDC->LineTo((int)newcofs[43][0],(int)newcofs[43][1]);pDC->FloodFill(37,100,RGB(7,7,7)); //here...Yes, so i want the flood fill to colour one part of the castle, a triangle. the coordinates 37,100 is where i want to begin drwaing,its coordinate inside the triangle, not the on the line whihc makes it up, however acctually in the triangle. PROBLEM: MY whole castle dissapears and becomes just a whole white page.   
  This sure looks like MFC to me; note that "VC++ not MFC" is not a meaningful phrase. MFC is a library of classes that wraps the Win32 API, and is available through Visual C++.Pedantry aside... FloodFill doesn't work the way you might expect. Have a look at the documentation and read carefully what the parameters do.That should get you on the right track [smile]   ;  k, kool thx. the x, y cooridates parts of floodfill was correct, however the 3rd parameter was incorrect. It is the colour of the boundary.So i changed to this. Note the boundray colours of my image is black RGB(0,0,0)So now i  have:   CBrush *someBrush; someBrush = new CBrush(RGB(40,40,40)); pDC->FloodFill(37,10,RGB(0,0,0));[\code]Now my castle doesnt disapear but it remains unchanged, no colour is added.;  Just creating the brush object won't do much by itself - you'll need to call pDC->SelectObject(brush); to make the brush "active" on the device context. Once the brush is selected, the fill should work.   