Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, Ayumi, NewbieZorro), 14,141 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Icon in Task Bar #139607
07/05/07 12:44
07/05/07 12:44
Joined: Jul 2005
Posts: 24
C
cwc Offline OP
Newbie
cwc  Offline OP
Newbie
C

Joined: Jul 2005
Posts: 24
How can I change the task bar icon of a published game? I've tried numerous methods described in various threads on this forum. All methods have something lacking. The one I have been using is changing the acknex.exe file's icon through a resource editor (ResEdit specifically) and then publishing with the new acknex.exe file. This works perfectly except for one problem: The icon that shows in the Windows task bar comes from acknex.dll, not acknex.exe. Using the same resource-editing method with acknex.dll works, but only with the -nc flag and only when launching directly from WED. If I publish the game, even adding the -nc flag to a shortcut that points to the published exe does not work. The engine returns an error saying that the implementation "has been corrupted" (even though -nc should prevent the engine from looking for corruption). So, how can the icon in the Windows task bar be changed in addition to the exe icon?

Re: Icon in Task Bar [Re: cwc] #139608
07/05/07 17:06
07/05/07 17:06

A
Anonymous
Unregistered
Anonymous
Unregistered
A



Interesting task!
(i don't think conitec will help you with this ) so try this

Re: Icon in Task Bar [Re: cwc] #139609
07/05/07 18:18
07/05/07 18:18
Joined: Dec 2003
Posts: 521
LazyDog Offline
User
LazyDog  Offline
User

Joined: Dec 2003
Posts: 521
you can do this using the Windows API SendMessage function.
you'll need to use the engine variable hWndMain
you'll need to read about how to use LoadIcon

here is a Delphi Example from the SDK Samples. This example is loading the new icon from a resource file.

// Uses icon from resource file (.rc) for the A7 Engine window.
SendMessage(ev.hWndMain, WM_SETICON, 1, LoadIcon(MainInstance, 'PROGICON'));


www.LazyDogSoftware.com
Delphi SDK Homepage

A7 Pro 780
Delphi 5 through 2010
Re: Icon in Task Bar [Re: ] #139610
07/05/07 20:53
07/05/07 20:53
Joined: Jul 2005
Posts: 24
C
cwc Offline OP
Newbie
cwc  Offline OP
Newbie
C

Joined: Jul 2005
Posts: 24
Mercuryus, you are my hero. Your demo app was extremely helpful. I now call the function to change the icon in the first line in my main function, and the icon changes immediately. Unfortunately, I still have the problem of the A6 icon appearing while C-script is being compiled and the splash screen is showing, before the main function actually begins executing. Any ideas for how I could change the acknex.dll icon even before the C-Script has finished compiling? Again, I can't thank you enough for this concise and highly effective demo app.

Re: Icon in Task Bar [Re: cwc] #139611
07/05/07 21:01
07/05/07 21:01

A
Anonymous
Unregistered
Anonymous
Unregistered
A



Quote:

Again, I can't thank you enough for this concise and highly effective demo app


...and the dll I wrote for you (and me .

Your welcome!

To hide the startup sequence (before accessing the main windows icon) is a more tricky task. You would need a starter application that starts the game hidden (no icon at all) and switch to it after loading. Thats too much for me

Re: Icon in Task Bar [Re: ] #139612
07/06/07 06:13
07/06/07 06:13
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
If you're using an external DLL, you can put the icon switching message call in the DllMain call. It's executed before compiling.

Re: Icon in Task Bar [Re: jcl] #139613
07/06/07 08:01
07/06/07 08:01

A
Anonymous
Unregistered
Anonymous
Unregistered
A



Thanx, I will try this...

Re: Icon in Task Bar [Re: ] #139614
07/06/07 09:30
07/06/07 09:30
Joined: Jul 2005
Posts: 24
C
cwc Offline OP
Newbie
cwc  Offline OP
Newbie
C

Joined: Jul 2005
Posts: 24
Mercuryus, I don't want to ask too much, since your demo and dll have already helped so much, but if you do decide to give the dllmain fix jcl suggested a try, I'd love to get a copy. Otherwise, I'll see if I can create some sort of "proxy dll" that calls your original dll from dllmain. Many thanks again.

Re: Icon in Task Bar [Re: cwc] #139615
07/06/07 15:52
07/06/07 15:52

A
Anonymous
Unregistered
Anonymous
Unregistered
A



download the zip again.
now the icon is changed automatically (DLLMAIN) to ICON.ico if it exists.
Unfortunately the blue A7-Icon is still visible for a moment.

Re: Icon in Task Bar [Re: jcl] #139616
07/06/07 16:14
07/06/07 16:14
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
Quote:

If you're using an external DLL, you can put the icon switching message call in the DllMain call. It's executed before compiling.




thanks, interesting news. at which state is the engine window created? after engine_bind()?

Page 1 of 2 1 2

Moderated by  old_bill, Tobias 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1