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

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

Postby ukoenig » Sat May 23, 2009 1:36 pm

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

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

Postby Daniel Garcia-Gil » Sat May 23, 2009 10:43 pm

User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

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

Postby Rick Lipkin » Sat May 23, 2009 11:15 pm

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

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

Postby ukoenig » Sun May 24, 2009 9:45 am

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

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

Postby Rick Lipkin » Sun May 24, 2009 1:22 pm

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

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

Postby ukoenig » Sun May 24, 2009 1:56 pm

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

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

Postby ukoenig » Sun May 24, 2009 2:47 pm

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 view

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

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

Postby Rick Lipkin » Sun May 24, 2009 3:47 pm

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

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

Postby ukoenig » Mon May 25, 2009 10:45 am

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 view

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

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

Postby Silvio » Tue May 26, 2009 1:34 pm

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

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 89 guests