Transparent Bitmap

Post Reply
User avatar
byte-one
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria
Contact:

Transparent Bitmap

Post 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
User avatar
byte-one
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria
Contact:

Post by byte-one »

Hello EMG,
"Try using PalBmpDraw() function for screen. "

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

MfG
Guenther
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post 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
Post Reply