testing all possible Combinations of < BTNBMP >
I noticed a problem with transparent Button-painting
on the new Gradient-Circle-background.
There is only the Function : GradientBrush
This function doesn't work with Circle-Gradient.
I think, we need a extra Function, to paint anything transparent on Circle-Gradient.
- Code: Select all Expand view
FUNCTION GradientBrush( oDlg, aColors, lPos )
local hDC, hBmp, hBmpOld, oBrush
if Empty( oDlg:oBrush:hBitmap )
hDC = CreateCompatibleDC( oDlg:GetDC() )
hBmp = CreateCompatibleBitMap( oDlg:hDC, oDlg:nWidth, oDlg:nHeight )
hBmpOld = SelectObject( hDC, hBmp )
GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, aColors, lPos )
DeleteObject( oDlg:oBrush:hBrush )
oDlg:oBrush:hBitmap = hBmp
oDlg:oBrush:hBrush = CreatePatternBrush( hBmp )
SelectObject( hDC, hBmpOld )
oDlg:ReleaseDC()
endif
RETURN NIL
With normal Gradient ( Horizontal / Vertical ) it works.
Is there a Solution for it ?
Normal Gradient :
Result with Circle Gradient :
Best Regards
Uwe