Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by jcl. 06/16/26 09:51
How to select between IB accounts by script?
by AndrewAMD. 06/13/26 15:44
Zorro tutorial ideas?
by AndrewAMD. 06/13/26 15:01
Zorro 3.01 recoded MMI function issue
by 11honza11. 06/13/26 11:40
Stooq now requires an API key
by AndrewAMD. 06/11/26 17:55
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 3,467 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Student_64151, Koti, curry, DeepxKalsi, Samed
19219 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
add_buffer() + 32.ico #269831
06/04/09 19:45
06/04/09 19:45
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
add_buffer("32.ico", icon, size);

it would be great if this worked! then we could include the icon in the exe instead of having it lying around in the folder.

Re: add_buffer() + 32.ico [Re: ventilator] #269940
06/05/09 09:39
06/05/09 09:39
Joined: Jul 2000
Posts: 28,108
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,108
Frankfurt
The problem is this: the icon must be loaded at the very beginning of the application start, before the engine is opened. Thus it must be an external file because add_buffer only works afterwards.

But you can alternatively change the icon directly in the exe with an icon editor. Then it's included in the exe.

Re: add_buffer() + 32.ico [Re: jcl] #269948
06/05/09 09:52
06/05/09 09:52
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
does the icon of the exe get displayed on the window? last time i checked it didn't but maybe i don't remember it correctly.

Re: add_buffer() + 32.ico [Re: ventilator] #271514
06/13/09 16:35
06/13/09 16:35
Joined: Feb 2007
Posts: 353
A
amy Offline
Senior Member
amy  Offline
Senior Member
A

Joined: Feb 2007
Posts: 353
No, the exe icon doesn't get displayed on the window. I think there is another icon in the dll which gets used.

It would be great if the window also used the icon from the exe! Couldn't this be changed?

Re: add_buffer() + 32.ico [Re: amy] #271518
06/13/09 17:21
06/13/09 17:21
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
doesnt it work when you change the icon of the acknex.exe with reshacker and then publish your project?


3333333333
Re: add_buffer() + 32.ico [Re: Quad] #271522
06/13/09 17:29
06/13/09 17:29
Joined: Feb 2007
Posts: 353
A
amy Offline
Senior Member
amy  Offline
Senior Member
A

Joined: Feb 2007
Posts: 353
No, this doesn't affect the icon of the engine window.

Re: add_buffer() + 32.ico [Re: amy] #271801
06/15/09 07:07
06/15/09 07:07
Joined: Jul 2000
Posts: 28,108
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,108
Frankfurt
No, it doesn't. I'll check if we can implement using the icon of the EXE, instead of the DLL icon, for the window and toolbar.

Re: add_buffer() + 32.ico [Re: jcl] #273700
06/23/09 22:47
06/23/09 22:47
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
Quote:
The application icon (displayed in the taskbar) is now set from the acknex.exe icon, and can be changed to any custom icon with an icon editor.


does this also work with my own exe if i use the engine from c++ or other languages or does this only work with the original acknex.exe?

Re: add_buffer() + 32.ico [Re: ventilator] #273719
06/24/09 06:14
06/24/09 06:14
Joined: Jul 2000
Posts: 28,108
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,108
Frankfurt
It works with the original compiled EXE, but when you use your own, you can set the icon anyway:

HICON app_icon = LoadIcon(hInstance,MAKEINTRESOURCE(IDI_ICON)); // use your ICON ID here
SendMessage(ev->hWnd, WM_SETICON, ICON_SMALL,(LPARAM)app_icon);
SendMessage(ev->hWnd, WM_SETICON, ICON_BIG,(LPARAM)app_icon);

Re: add_buffer() + 32.ico [Re: jcl] #275140
06/30/09 09:38
06/30/09 09:38
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
thanks! i tried this and it works but there is a small problem.

in my exe i have this resource:
Code:
Icon Group
  1
    English (United States)
      32x32 16 Colour
      16x16 16 Colour
      32x32 256 Colour
      16x16 256 Colour
      48x48 32 Bit Colour
      32x32 32 Bit Colour
      16x16 32 Bit Colour



i get the icon like that:
HICON app_icon = LoadIcon(hInstance,MAKEINTRESOURCE(1));

but then a 32x32 icon gets used for ICON_SMALL and ICON_BIG. 32x32 doesn't look good on the window where it's supposed to be 16x16! (that's also why the default a7 icon is so ugly on the window.)

maybe you or someone else knows how to get a 16x16 icon for ICON_SMALL?

Page 1 of 2 1 2

Moderated by  aztec, Spirit 

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