Page 1 of 1

Transparent Bitmap

Posted: Thu Feb 02, 2006 9:30 pm
by byte-one
Hello all,
is there an function to draw an transparent (0,0 pixel or an other is maskcolor) bitmap on screen and printer with resizable dimensions of the bitmap. The function "drawmasked" are not resizeable and on printer are not shown!

Many thanks
Guenther
Mail: office@byte-one.com

Re: Transparent Bitmap

Posted: Thu Feb 02, 2006 9:40 pm
by Enrico Maria Giordano
Try using PalBmpDraw() function for screen.

EMG

Posted: Thu Feb 02, 2006 10:17 pm
by byte-one
Hello EMG,
"Try using PalBmpDraw() function for screen. "

There is an parameter ltransparent in this function, but no effect!?

MfG
Guenther

Posted: Fri Feb 03, 2006 8:19 am
by Enrico Maria Giordano
This is a working sample:

Code: Select all

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg

    LOCAL hBmp

    DEFINE DIALOG oDlg

    hBmp = READBITMAP( 0, "C:\FWHARBOUR\BITMAPS\OPEN.BMP" )

    ACTIVATE DIALOG oDlg;
             ON PAINT PALBMPDRAW( hDC, 10, 10, hBmp, , , , , .T., oDlg:nClrPane )

    IF hBmp != 0; DELETEOBJECT( hBmp ); ENDIF

    RETURN NIL
EMG