Page 1 of 1

Transparent Logo from Resource on Wnd-main ?

PostPosted: Sun Oct 21, 2012 3:57 pm
by ukoenig
Hello,

I want to use a defined Logo from Resource.
Using a Alphablended BMP is no problem,
but from Resource ( changed transparent to a background-color )
I don't get it painted transparent on the Main-wnd.
Using Borland-resource-workshop, it is not possible, to include BMPs with Alphachanel.

Image

I tested ( not transparent ) :

DEFINE IMAGE oImg OF oWnd RESOURCE "Logo" TRANSPARENT

ACTIVATE WINDOW oWnd ;
ON INIT ( SET_BRUSH( oWnd, nWStyle, lWDirect, nWColor1, nWColor2, nWGradPos, ;
cWBrush, nScrwidth, nScrheight ), WND_BAR(oMainFld) ) ;
ON PAINT PalBmpDraw( hDC, nWLogoLeft, nWLogoTop, oImg:hBitmap )

Best Regards
Uwe :?:

Re: Transparent Logo from Resource on Wnd-main ?

PostPosted: Mon Oct 22, 2012 12:09 am
by fraxzi
Dear Uwe,

I solved that using PellesC Resource compiler.

Re: Transparent Logo from Resource on Wnd-main ?

PostPosted: Mon Oct 22, 2012 11:25 am
by ukoenig
Frances

I found a solution, using a big button

@ 120, 100 BTNBMP oBtn1 OF oWnd ;
SIZE 520, 520 PIXEL ;

RESOURCE "Logo" ;
ACTION MsgAlert( "Logo-Test" ) ;
FONT oFont1 ;
TOP NOBORDER
oBtn1:lTransparent := .t.
oBtn1:cToolTip = { "Company" + CRLF + "Info","Company", 1, CLR_BLACK, 14089979 }
oBtn1:SetColor( 0, )


Image

Best Regards
Uwe :lol: