FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TestTitl.prg Sample MDI
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: TestTitl.prg Sample MDI
Posted: Thu Mar 01, 2012 03:58 AM
Dear Mr.Rick,

Rick Lipkin wrote:I have no clue why the toolbar class is not showing up with transparent icons like yours :-)
Thanks
Rick


What about the resource compiler used by you ? Does it support Alpha channel ?

Regards
Anser
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: TestTitl.prg Sample MDI
Posted: Thu Mar 01, 2012 11:39 AM
Rick,

You can use these BMP-styles as well :



Best regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: TestTitl.prg Sample MDI
Posted: Thu Mar 01, 2012 01:46 PM

Anser

I am creating and using successfully 24 bit alpha blend icons derived from .png with Gimp photo editor then adding the the .bmp using Resedit to insert them into .rc

All I am doing at this point is adding the .rc that contains my icons into my project to be compiled with the standard Borland 582. I tested the Toolbar class with those very same alpha blend icons that work in the buttonbar class.

I do not know why the toolbar class will not show transparent icons :(

Rick Lipkin

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: TestTitl.prg Sample MDI
Posted: Fri Mar 02, 2012 05:02 PM
Rick,

with some more Tests, I found what's wrong : TRANSPARENT BMP
I repainted a original 24 Bit transparent BMP.



oImageList = TImageList():New( 32, 32 ) // width and height of bitmaps

From Resource
-----------------
oImageList:AddMasked( TBitmap():Define( "New", , oWnd ), nRGB( 255, 0, 255 ) )
oImageList:AddMasked( TBitmap():Define( "Open", , oWnd ), nRGB( 255, 0, 255 ) )
oImageList:AddMasked( TBitmap():Define( "Check", , oWnd ), nRGB( 255, 0, 255 ) )
oImageList:AddMasked( TBitmap():Define( "Search", , oWnd ), nRGB( 255, 0, 255 ) )
oImageList:AddMasked( TBitmap():Define( "Print", , oWnd ), nRGB( 255, 0, 255 ) )
oImageList:AddMasked( TBitmap():Define( "Internet", ,oWnd ), nRGB( 255, 0, 255 ) )
oImageList:AddMasked( TBitmap():Define( "Keys", , oWnd ), nRGB( 255, 0, 255 ) )

From Code 24 Bit transparent ( Alphablended ) Doesn't work because of nRGB( 255, 0, 255 ) !!!
---------------------------------------------------------------------------
oImageList:AddMasked( TBitmap():Define( ,c_path + "\Images\Select.bmp", oWnd ), nRGB( 255, 0, 255 ) )

From Code 24 Bit with purple Background ( repainted No transparent ) Works !!!
------------------------------------------------------------------------------------------
oImageList:AddMasked( TBitmap():Define( ,c_path + "\Images\Select1.bmp", oWnd ), nRGB( 255, 0, 255 ) )

oImageList:AddMasked( TBitmap():Define( ,c_path + "\Images\Quit.bmp", oWnd ), nRGB( 255, 0, 255 ) )

changed :
oImageList:AddMasked( TBitmap():Define( ,c_path + "\Images\Select.bmp", oWnd ), nRGB( 255, 0, 255 ) )
against :
oImageList:AddMasked( TImage():Define( ,c_path + "\Images\Select.bmp", oWnd ) )



Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: TestTitl.prg Sample MDI
Posted: Fri Mar 02, 2012 08:10 PM

Uwe

Interesting discovery .. just curious why the default icons used in the original sample would not work .. they were taken from the Fwh\Bitmaps folder and were purple background ?

Rick

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: TestTitl.prg Sample MDI
Posted: Fri Mar 02, 2012 08:24 PM
Rick,

The used BMP's from Sub-folder 32 x 32 :


nRGB( 255, 0, 255 ) defines a Image-background.
That is the Reason, a Alphachannel is ignored.

using :
oImageList:Add( TImage():Define( ,c_path + "\Images\Select.bmp", oWnd ) )
Alphablended BMP's are painted, but the Border is not 100 %.

Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.

Continue the discussion