Page 2 of 2
Re: How to create a <special> Buttonbar (9.04 / code included)
Posted: Sat May 23, 2009 1:36 pm
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

Re: How to create a <special> Buttonbar (9.04 / code included)
Posted: Sat May 23, 2009 10:43 pm
by Daniel Garcia-Gil
Re: How to create a <special> Buttonbar (9.04 / code included)
Posted: Sat May 23, 2009 11:15 pm
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
Re: How to create a <special> Buttonbar (9.04 / code included)
Posted: Sun May 24, 2009 9:45 am
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 ) .

Download :
http://www.pflegeplus.com/fw_downloads/Button1.zipButton-Test

Best Regards
Uwe

Re: How to create a <spec.> Buttonbar 9.04 ( Symbols included)
Posted: Sun May 24, 2009 1:22 pm
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
Re: How to create a <spec.> Buttonbar 9.04 ( Symbols included)
Posted: Sun May 24, 2009 1:56 pm
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.

Best regards
Uwe

Re: How to create a <spec.> Buttonbar 9.04 ( Symbols included)
Posted: Sun May 24, 2009 2:47 pm
by ukoenig
How to do it :

To work with Alpha-Blended BMP's, for me the best solution to convert :
viewtopic.php?f=3&t=15008&p=77576&hilit=pixelformer#p77576Code: 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

Re: How to create a <spec.> Buttonbar 9.04 ( Symbols included)
Posted: Sun May 24, 2009 3:47 pm
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
Re: How to create a <spec.> Buttonbar 9.04 ( Symbols included)
Posted: Mon May 25, 2009 10:45 am
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
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

Re: How to create a <spec.> Buttonbar 9.04 ( Symbols included )
Posted: Tue May 26, 2009 1:34 pm
by Silvio
good but you must stay on warning with public variables