Home > Back-end >  Based on the dialog box without ontouch () to do, can only use ONPIANT () function
Based on the dialog box without ontouch () to do, can only use ONPIANT () function

Time:09-26

Void CSampleseedfillView: : ontouch * pDC (CDC)
{
CSampleseedfillDoc * pDoc=GetDocument ();
ASSERT_VALID (pDoc);
//TODO: add the draw code for native data here
//
define brush colorCPen PenRed (PS_SOLID, 1, RGB (0, 255));//define the red pen
CPen PenBlue (PS_SOLID, 1, RGB (0,0,255));//define blue pen
Int x, y;
//blue, and outlined the deformation boundary
PDC - & gt; SelectObject (& amp; PenBlue);
POINT polygon [5]={{300120}, {390160}, {430320}, {180300}, {150240}};
PDC - & gt; Polygon (Polygon, 5);
//define seed position, background color oldcolor and fill color newcolor
X=300; Y=200;
COLORREF newcolor=RGB (0, 255);
COLORREF oldcolor=RGB (0,0,255);
//call the scan line filling algorithm program
Floodfill4 (x, y, oldcolor, newcolor);
}


Now this is not based on the dialog box, based on the dialog box is no ontouch () function, how to use onpaint () function, this is the area filling in, the great god, who can ah, thank you!
  • Related