Page 1 of 2
Button Bar JPG or PNG
Posted: Tue Nov 01, 2016 6:33 pm
by cdmmaui
Hello Everyone,
We are looking to improve the looks of our application home screen. Is it possible to use JPG or PNG instead of BMP on buttonbar?
Also, would anyone provide a sample of the their home screen with code?
We have not updated our home screen layout in a very long time and we want to provide a more professional look.
Thanks in advance for your assistance!
Re: Button Bar JPG or PNG
Posted: Tue Nov 01, 2016 8:43 pm
by luiz53
Re: Button Bar JPG or PNG
Posted: Tue Nov 01, 2016 8:55 pm
by cnavarro
With resources use type 10 for others images
cut16 10 "./res/g1045A.png"
mytest 10 "../icons/blue.ico"
isok BITMAP "../bitmaps//level11.bmp"
Re: Button Bar JPG or PNG
Posted: Tue Nov 01, 2016 9:02 pm
by cdmmaui
Thank you so much!
Re: Button Bar JPG or PNG
Posted: Wed Nov 02, 2016 3:56 pm
by Rick Lipkin
Cristobal
How can you compile into .res with Borland ... the highest resolution is 24 bit .. Borland will not compile 32 bit image ?
Rick Lipkin
Re: Button Bar JPG or PNG
Posted: Wed Nov 02, 2016 5:24 pm
by Carlos Mora
Hi Rick,
Wich Borland? I think the latest versions should allow 32 bits bmps.
I've been using porc.exe, the Resource Compiler included in Pelles C, for years to include 32 bit bmp into resources. It works great.
Best regards,
Carlos
Re: Button Bar JPG or PNG
Posted: Wed Nov 02, 2016 7:37 pm
by Rick Lipkin
Carlos
I am using Bcc72 .. I have been using Bcc70 for a long time .. Brc32 just will not compile any .bmp greater than 24 bit .. You can import a 32 bit bmp into an .rc, but when you compile your .rc into .res .. the compiler blows up. To be honest, I just installed Bcc72 and I haven't tried to compile a 32 bit .bmp in a resource.
Rick Lipkin
Re: Button Bar JPG or PNG
Posted: Thu Nov 03, 2016 1:16 am
by cnavarro
Rick Lipkin wrote:Cristobal
How can you compile into .res with Borland ... the highest resolution is 24 bit .. Borland will not compile 32 bit image ?
Rick Lipkin
Rick, if you define you image of 32 bits:
files BITMAP "../bitmaps/alphabmp/files.bmp"
Borland fails to compile the resource, but, if you define your image 32 bits so:
files 10 "../bitmaps/alphabmp/files.bmp"
The resource is compiled perfectly
Re: Button Bar JPG or PNG
Posted: Thu Nov 03, 2016 1:24 am
by cnavarro
As an additional comment, I use the resource compiler brc32.exe also included in Borland 7
My previous post also works with the resource compiler rc.exe
%bcdir%\bin\brc32
Rick, happy, happy birthday
Have a good day in the company of family and friends
Re: Button Bar JPG or PNG
Posted: Thu Nov 03, 2016 1:02 pm
by Rick Lipkin
Cristobal .. thanks for your kind words .. planning lunch with my wife this afternoon .. my son will be coming home for the weekend to spend time some time with his Mom and me and a hamburger and hot dog cook-out Sunday evening.
I have all my .bmp's in one .rc ( icons.rc ) .. and I do not see where I can define 10 in Resedit. See screen shot below... Again, thanks !
Rick Lipkin
Re: Button Bar JPG or PNG
Posted: Thu Nov 03, 2016 1:18 pm
by cnavarro
Rick, I add these resources with a code editor ( text )
#define ALPHABMP 10
olga1 ALPHABMP "../bitmaps/olga1.jpg"
files ALPHABMP "../bitmaps/alphabmp/files.bmp"
To enjoy family and cookout
Re: Button Bar JPG or PNG
Posted: Thu Nov 03, 2016 4:17 pm
by Massimo Linossi
Happy birthday Rick !!!
Re: Button Bar JPG or PNG
Posted: Thu Nov 03, 2016 5:09 pm
by Rick Lipkin
Cristobal
I understand .. I will just create a new ( manual ) group '10' and load my icons there .. I will let you know .. Thanks for the explanation !
Rick Lipkin
Massimo .. thanks for your thoughts !
Re: Button Bar JPG or PNG
Posted: Fri Nov 04, 2016 3:31 pm
by Enrico Maria Giordano
Rick... Happy Birthday!
EMG
Re: Button Bar JPG or PNG
Posted: Fri Nov 04, 2016 5:06 pm
by Rick Lipkin
Enrico
Thank you very much .. you have been an inspiration for me over the ( many ) years!
Rick Lipkin