How to create a <spec.> Buttonbar 9.04 ( Symbols included )

User avatar
ukoenig
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: How to create a <special> Buttonbar (9.04 / code included)

Post by ukoenig »

Hello Rick,

That means, You need Alpha-Blended-BMP's.
I think, You can include the BMP's to a Resource ( BMP 24 Bit ) ,
but Workshop will say < wrong format > as soon You try to edit the BMP.
I also included 24 Bit BMP's and it works.

A post-answer ( I didn't try it for the moment ) :
or search for : < PNG from Resource > in the forum

by toninhofwi » Tue Mar 31, 2009 11:39 pm
Hi Uwe,
Borland Resource Workshop can do it:
#define RT_RCDATA 10
nId RT_RCDATA NONDISCARDABLE "imagem.png"
My question is another: How to load it and have a valid handle, maybe something like:
hBitmap = LoadBitmap( GetResources(), cResName )

Thanks and best regards,
Toninho.toninhofwi

Posts: 65
Joined: Tue Oct 18, 2005 10:01 am

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
Rick Lipkin
Posts: 2677
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA
Been thanked: 2 times

Re: How to create a <special> Buttonbar (9.04 / code included)

Post by Rick Lipkin »

Uwe

I was able to use InfranView and take the stock .png from FWH and save as .bmp .. and I loaded it to resource and have it working great ..

BRW grunted about it but I was able to import it .. I just can not view it in
BRW .. but it compiled.

Thanks
Rick
User avatar
ukoenig
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: How to create a <special> Buttonbar (9.04 / code included)

Post by ukoenig »

Hello Rick,

I hope everything is included.
Transparent Button-symbols in PNG-format ( Maybe a little bit darker ? ).
I painted them with the wanted color and added a light shadow around.
If there is still something missing, let me know, what kind of symbol You need.
The converted PNG's to Alpha-Blended BMP's are bit darker ( included ) .

Image

Download :
http://www.pflegeplus.com/fw_downloads/Button1.zip

Button-Test
Image

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
Rick Lipkin
Posts: 2677
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA
Been thanked: 2 times

Re: How to create a <spec.> Buttonbar 9.04 ( Symbols included)

Post by Rick Lipkin »

Uwe

Many thanks .. everytime I see your examples I seem to ask more questions .. On your last post .. your vertical gradient appears to have 3 colors .. tan, white and a small hint of blue .. How did you manage more than two gradient colors ?

Rick
User avatar
ukoenig
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: How to create a <spec.> Buttonbar 9.04 ( Symbols included)

Post by ukoenig »

Hello Rick,

it is possible, to paint 2 different Gradients next each other ( some calculation necessary ).
I will show in this post, how to manage this.

Just a example : A combination of Buttonbar ( normal ) with the new created one.

Image

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
Contact:

Re: How to create a <spec.> Buttonbar 9.04 ( Symbols included)

Post by ukoenig »

How to do it :

Image

To work with Alpha-Blended BMP's, for me the best solution to convert :
viewtopic.php?f=3&t=15008&p=77576&hilit=pixelformer#p77576

Code: Select all | Expand

STATIC FUNCTION GRADBAR( hDC, oDlg )// Left Gradient-Border// -------------------------local aGrad1 := { { 0.1, 128, 16777215 },{ 0.1, 16777215, 128 } }// Main-Gradient// -------------------local aGrad2 := { { 0.1, 10389063, 16777215 },{ 0.1, 16777215, 5156778 } }GradientFill( hDC,  0, 0, oDlg:nHeight, oDlg5:nWidth, aGrad2, .F. )// Must be painted on top of the main-Gradient !!!// --------------------------------------------------------GradientFill( hDC,  0, 0, oDlg:nHeight, 10, aGrad1, .F. )RETURN NIL 


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
Rick Lipkin
Posts: 2677
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA
Been thanked: 2 times

Re: How to create a <spec.> Buttonbar 9.04 ( Symbols included)

Post by Rick Lipkin »

Uwe

Awsome .. I am off Monday for Memorial day here in the States .. I will VPN to work and start coding your suggestions.

Rick
User avatar
ukoenig
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: How to create a <spec.> Buttonbar 9.04 ( Symbols included)

Post by ukoenig »

Hello Rick,

I finished the first new Button-Set ( 27 Styles ).
There are 4 different Buttons ( colors ), You can define at a Button-action
There are both formats : PNG and Alpha-Blended-BMP included.
also the Files have real names now, to locate them :

// The order to use the BMP's :
// ----------------------------------
1 : Phone_A.bmp = Aktiv ( Basic-Color )
2 : Phone_P.bmp = Pressed
3 : Phone_D.bmp = Disable
4 : Phone_M.bmp = Mouse-Caption

Download : ( 0.7 MB ) http://www.pflegeplus.com/fw_downloads/buttonset1.zip

Image

Code: Select all | Expand

@ 0, 8 BTNBMP oBtn50 OF oDlg5 ;SIZE 45 , 40  PROMPT "Source 1" ;FONT oBarFont ;TOP ;NOBORDER ;FILENAME c_path + "\system\Phone_A.bmp", ;         c_path + "\system\Phone_P.bmp", ;         c_path + "\system\Phone_D.bmp", ;         c_path + "\system\Phone_M.bmp" ;ACTION ( DLG_CODE1() )oBtn50:lTransparent = .T.oBtn50:cTooltip := "1. Source Preview"oBtn50:lBorder := .F. *FILENAME c_path + "\system\Phone_A.bmp", ;*               c_path + "\system\Phone_P.bmp", ;*               NIL, ;  // Disable not needed*               c_path + "\system\Phone_M.bmp" ; 


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
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: How to create a <spec.> Buttonbar 9.04 ( Symbols included )

Post by Silvio »

good but you must stay on warning with public variables
Best Regards, Saludos

Falconi Silvio
Post Reply