Anser,
CLASS TButtonBmp METHOD Paint() calls DrawMasked() to paint the bitmap.
If you change that call into ABPaint(), as used un FWH\samples\TestAB.prg then you may be able to use the Alpha channel
ACTIVATE WINDOW oWnd ;
ON PAINT ABPaint( hDC, 10, 10, oBmp:hBitmap, 220 ) // 0-255 transparency level
@14.3,05 BUTTONBMP oBtnCancel PROMPT "Close" OF oDlg TEXTRIGHT BITMAP "Images/AnsTest.Bmp" ;
SIZE 50,15 ACTION oDlg:End()
@14.3,05 BUTTONBMP oBtnCancel PROMPT "Close" OF oDlg TEXTRIGHT BITMAP "AnsTest" ;
SIZE 50,15 ACTION oDlg:End()
AnsTest BITMAP Images\AnsTest.Bmp
#ifdef __FLAT__
1 24 "Images/WindowsXP.Manifest"
#endif
if ::lActive
/* DrawMasked( ::hDC, ::hBitmap, nTop + If( lPressed, 1, 0 ),;
nLeft + If( lPressed, 1, 0 ) ) */
ABPaint( ::hDC, nTop + If( lPressed, 1, 0 ), nLeft + If( lPressed, 1, 0 ) , ::hBitmap, 220 )
else
DrawGray( ::hDC, ::hBitmap, nTop + If( lPressed, 1, 0 ),;
nLeft + If( lPressed, 1, 0 ) )
endif
Your bitmap is loaded from resources, isn't it ?
Windows API seems not to be respecting the alpha channel when loading it from resources.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 95 guests