To All
I am looking to color fill a groupbox like the screenshot below .. I do want the text to be transparent.
Any help would be appreciated!
Thanks
Rick Lipkin
// -------- DIALOG - Background ---------------
FUNCTION D_BACKGRD( oDlg, nStyle, nColor1, nColor2, lDirect, nMove, cBrush, cImage)
Local oBrush
IF nStyle = 1
DEFINE BRUSH oBrush COLOR nColor1
ENDIF
IF nStyle = 2
aGrad := { { nMove, nColor1, nColor2 }, { nMove, nColor2, nColor1 } }
hDC = CreateCompatibleDC( oDlg:GetDC() )
// Get Width and Height from INIT !!!
hBmp = CreateCompatibleBitMap( oDlg:hDC, oDlg:nWidth, oDlg:nHeight )
hBmpOld = SelectObject( hDC, hBmp )
GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, aGrad, lDirect )
DeleteObject( oDlg:oBrush:hBrush )
oBrush := TBrush():New( ,,,, hBmp )
oBrush:Cargo := aGrad
SelectObject( hDC, hBmpOld )
ReleaseDC(hDC)
ENDIF
IF nStyle = 3
DEFINE BRUSH oBrush FILE c_path + "\Images\" + cBrush
ENDIF
IF nStyle = 4
DEFINE IMAGE oImage FILE c_path + "\Images\" + cImage
// Get Width and Height from INIT !!!
oBrush := TBrush():new( ,,,, ResizeBmp( oImage:hBitmap, oDlg:nWidth, oDlg:nHeight, .T. ) )
oImage:End()
ENDIF
oDlg:SetBrush( oBrush )
oBrush:End()
RETURN( NIL )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 103 guests