if ! Empty( hBmp )
if ::lBmpTransparent
if SetAlpha() .and. ::aAlpha[ nBtn ]
ABPaint( ::hDC, oBmpRect:nLeft, oBmpRect:nTop, hBmp, ::nAlphaLevel() )
else
DrawTransBmp( ::hDc, hBmp, oBmpRect:nTop, oBmpRect:nLeft, oBmpRect:nWidth, oBmpRect:nWidth )
endif
else
PalBmpDraw( ::hDC, oBmpRect:nTop, oBmpRect:nLeft, hBmp, hPal, oBmpRect:nWidth, oBmpRect:nHeight, ;
nil, ::lBmpTransparent )
endif
endif
Antonio Linares wrote:Enrico,
Just curiosity, have you tried with + 2 ?
Antonio Linares wrote:It seems to me as those functions are using the coordinates in a different way. We are going to review it, thanks
if ! Empty( hBmp )
if ::lBmpTransparent
if SetAlpha() .and. ::aAlpha[ nBtn ]
ABPaint( ::hDC, oBmpRect:nLeft, oBmpRect:nTop, hBmp, ::nAlphaLevel() )
else
DrawTransBmp( ::hDC, hBmp, oBmpRect:nTop, oBmpRect:nLeft, oBmpRect:nWidth, oBmpRect:nWidth )
endif
else
DrawTransBmp( ::hDC, hBmp, oBmpRect:nTop, oBmpRect:nLeft, oBmpRect:nWidth, oBmpRect:nWidth )
endif
endif
Antonio Linares wrote:Enrico,
Please change it this way and it should work fine:
- Code: Select all Expand view RUN
if ! Empty( hBmp )
if ::lBmpTransparent
if SetAlpha() .and. ::aAlpha[ nBtn ]
ABPaint( ::hDC, oBmpRect:nLeft, oBmpRect:nTop, hBmp, ::nAlphaLevel() )
else
DrawTransBmp( ::hDC, hBmp, oBmpRect:nTop, oBmpRect:nLeft, oBmpRect:nWidth, oBmpRect:nWidth )
endif
else
DrawTransBmp( ::hDC, hBmp, oBmpRect:nTop, oBmpRect:nLeft, oBmpRect:nWidth, oBmpRect:nWidth )
endif
endif
DrawTransBmp( ::hDC, hBmp, oBmpRect:nTop, oBmpRect:nLeft, oBmpRect:nWidth, oBmpRect:nWidth )
DrawTransBmp( ::hDc, hBmp, oBmpRect:nTop + 1, oBmpRect:nLeft + 1, oBmpRect:nWidth, oBmpRect:nWidth )
REDEFINE BTNBMP;
ID 109 OF oDlg;
RESOURCE "BMP1", NIL, "BMP2";
ACTION ...
CONTROL "", 109, "TBtnBmp", WS_CHILD | WS_VISIBLE, 207, 125, 10, 13
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
DEFINE DIALOG oDlg;
SIZE 800, 600
@ 10, 10 BTNBMP SIZE 20, 20;
FILE "c:\fwh\bitmaps\open.bmp";
ADJUST
ACTIVATE DIALOG oDlg;
CENTER
RETURN NIL
Return to Bugs report & fixes / Informe de errores y arreglos
Users browsing this forum: No registered users and 0 guests