buttons picture on toolbar disappear

Moderator: Rathinagiri

Post Reply
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

buttons picture on toolbar disappear

Post by l3whmg »

Hy guys,
I need your help.
When I execute my program (that is more functions together and “any” function have it’s form), many times all/someone picture on the toolbar disappear :( , but…magically if I leave current form and recall it (one or more times from main menu) the buttons picture come back :o . I’ve included a zip file with: Shot01.jpg (with problem) and Shot02.jpg (without problem), toolbar.prg (toolbar definition in my functions inside any form), my “nbuild.bat” (I’ve do some modification) to explain how I’m using windres.exe (I adding my pictures adding extra .rc file) and one bitmap file.
I’m compiling on MSWinXpPro with “HMG 3.0.0 Test XIII (2009.12.23)” but I remember the same problem with HMG2.0;
I've create my bitmap files with Gimp.

Someone have one idea?
Thanks a lot in advance and sorry for my bad English :oops: .
Attachments
ErroreBottoni.zip
(10.7 KiB) Downloaded 253 times
Luigi from Italy
www.L3W.it
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: buttons picture on toolbar disappear

Post by Roberto Lopez »

l3whmg wrote:Hy guys,
I need your help.
When I execute my program (that is more functions together and “any” function have it’s form), many times all/someone picture on the toolbar disappear :( , but…magically if I leave current form and recall it (one or more times from main menu) the buttons picture come back :o . I’ve included a zip file with: Shot01.jpg (with problem) and Shot02.jpg (without problem), toolbar.prg (toolbar definition in my functions inside any form), my “nbuild.bat” (I’ve do some modification) to explain how I’m using windres.exe (I adding my pictures adding extra .rc file) and one bitmap file.
I’m compiling on MSWinXpPro with “HMG 3.0.0 Test XIII (2009.12.23)” but I remember the same problem with HMG2.0;
I've create my bitmap files with Gimp.

Someone have one idea?
Thanks a lot in advance and sorry for my bad English :oops: .
Please post a complete (compilable) sample showing the problem, then, I'll analyze it.

TIA.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Ricci
Posts: 255
Joined: Thu Nov 19, 2009 2:23 pm

Re: buttons picture on toolbar disappear

Post by Ricci »

Luigi,

do you use a "pure Windows" or did you have any shell or taskbar addons to get a better look ?

HMG programs don´t like the snapshot function of some utilities (i.e. NextStart).


Regards ... Ricci
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: buttons picture on toolbar disappear

Post by l3whmg »

Hi guys,
many thanks but today I've find solution :)
The problem was the procedure that I’ve used to create bitmap pictures with Gimp; I don’t know if the new procedure it’s the correct way, but solve my problem.
For every newbe (like me :mrgreen: ) some topics:

1) Yes, I use layers (inside .xcf) with transparency background, but there is one layer (filled with color ECE9D8) that I turn on before save bmp picture.
2) When I save .bmp file I use "Unisci livelli" (Eng. "Merge Layers" - I think)
3) MOST important I use "Opzioni avanzate" (Eng. "Advanced setting" - I think) and I select 24bits (R8G8B8)
I've included image about saving procedure (Gipm Italian Language) to better explain.
In previous procedure a) I don't have used a layer with color and b) I have used 32bits (A8R8G8B8).

I think the problem was an "incorrect" loading or recognizing of the bitmap inside the exe.

And now the question: this have solved my problem, but is it the correct way or is there another way?
A little note: if I don't use the layer filled with one color, the pictures on the toolbar have a white background.
Attachments
ScreenShot.zip
(30.64 KiB) Downloaded 291 times
Luigi from Italy
www.L3W.it
Post Reply