TestTitl.prg Sample MDI

Re: TestTitl.prg Sample MDI

Postby anserkk » Thu Mar 01, 2012 3: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
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: TestTitl.prg Sample MDI

Postby ukoenig » Thu Mar 01, 2012 11:39 am

Rick,

You can use these BMP-styles as well :

Image

Best regards
Uwe :lol:
Last edited by ukoenig on Thu Mar 01, 2012 1:50 pm, edited 1 time in total.
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: TestTitl.prg Sample MDI

Postby Rick Lipkin » Thu Mar 01, 2012 1: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
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: TestTitl.prg Sample MDI

Postby ukoenig » Fri Mar 02, 2012 5:02 pm

Rick,

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

Image

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 ) )

Image

Best Regards
Uwe :!:
Last edited by ukoenig on Fri Mar 02, 2012 8:40 pm, edited 1 time in total.
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: TestTitl.prg Sample MDI

Postby Rick Lipkin » Fri Mar 02, 2012 8: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
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: TestTitl.prg Sample MDI

Postby ukoenig » Fri Mar 02, 2012 8:24 pm

Rick,

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

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 :lol:
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 80 guests