NOt the same color when I load this function
Posted: Sun Feb 05, 2006 10:46 am
When I load this function I insert a color as the defines :
On Main program I insert these lines
and then
the func disegna is this
but the procedure draw black rectangules ...why ?
I want blu or red rectang
Best Regards
On Main program I insert these lines
Code: Select all
DEFINE BRUSH oPenL COLOR CLR_HBLUE
DEFINE BRUSH oPenR COLOR CLR_HRED
Code: Select all
disegna( nLinea+nVertic+4, nColumnaInicio+nHoriz2, nLinea+nVertic+14, nColumnaFinal+nHoriz2, oPenR )
the func disegna is this
Code: Select all
Func disegna ( nTop, nLeft, nBottom, nRight, nColor )
LOCAL oBrush, hBru, hOld
hBru := CreateSolidBrush( nColor )
hPen := CreatePen( nColor )
hOld := SelectObject( hDC, hBru )
Rectangle( hDC, nTop, nLeft, nBottom, nRight, hPen )
* MoveTo( hDC, nLeft, nTop )
* LineTo( hDC, nRight, nBottom, hPen )
FillRect( hDC, { nTop + 2, nLeft + 2, nBottom, nRight }, hBru )
SelectObject( hDC, hOld )
DeleteObject( hBru )
RETURN (Nil)
but the procedure draw black rectangules ...why ?
I want blu or red rectang
Best Regards