Floodfill and rectang

Floodfill and rectang

Postby Silvio » Wed Jan 25, 2006 12:51 am

I must fill of a color an rectag

I use a define to INSERT A bRUSH

Code: Select all  Expand view
DEFINE BRUSH oPen1 COLOR CLR_HBLUE 
DEFINE BRUSH oPen2 COLOR CLR_HRED 


MY FUNC IS CALLED
Code: Select all  Expand view
FLOODY(NTOP,NLEFT,NBOTTOM,NRIGHT,NCOLOR,NUMBER)


bUT i NOT kNOW HOW FLOODFILL A RECTANG i TRY WITH :
Code: Select all  Expand view
LOCAL oBrush,  hOld

   hBru := CreateSolidBrush( nColor )
   hOld := SelectObject( ::hDC, hBru )
   hpen:=CreatePen(0,8,nColor)
   Rectangle( ::hDC, nTop, nLeft, nBottom, nRight, hpen )
   FillRect( ::hDC, { nTop, nLeft, nBottom, nRight }, hBru )
   SelectObject( ::hDC, hOld )
   DeleteObject( hBru )


but it not run ok
Someone can help me please

Regards
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 72 guests