flat assembler
Message board for the users of flat assembler.

Index > Windows > How does windows handle icons in EXE's

Author
Thread Post new topic Reply to topic
Chewy509



Joined: 19 Jun 2003
Posts: 297
Location: Bris-vegas, Australia
Chewy509 23 May 2007, 04:11
This is more of a general question. As everyone is aware it's possible to store 1 or more icons within the resource section of a PE file.

If the file is an EXE, then WindowsNT will use the first icon listed as the application icon within the group_icon structure. (Win9x will using the first in alphabetical order, but for my purpose lets even forget that Win9x existed).

Now say, within the resource section I have multiple icons, all with the same name but at different resolutions, will Windows choose the matching size/resolution for display in explorer ,eg when you switch between icon, detail, thumbnail view, etc does it select the 32x32 icon instead of the first icon, or does it scale the first icon to fit (eg 128x128 down to 32x32)?

If it scales, does someone have any good resources on creating good icons that scale well (when used with scaling algorithm that Windows use).

Now fast forward to Vista... I haven't been able to find any solid references on how Vista handles these icons (and since I don't have Vista installed, I can't test it personally).

Since Vista is apparently "DPI-aware", does it do things differently? I've read Vista can use PNG encoded icons up-to 256x256, which may be of interest.

PS. All my icons are 256x256 native, and then resized using Paint.NET, and then converted to *.ico's...
Post 23 May 2007, 04:11
View user's profile Send private message Visit poster's website Reply with quote
hidden



Joined: 14 Feb 2007
Posts: 49
hidden 23 May 2007, 05:27
I think since Windows 95 it handles multi-resolutions icons, for each thing to do.
http://board.flatassembler.net/topic.php?t=6817 - Here's example.

_________________
Image Lang: (eng|рус)
Post 23 May 2007, 05:27
View user's profile Send private message Reply with quote
Chewy509



Joined: 19 Jun 2003
Posts: 297
Location: Bris-vegas, Australia
Chewy509 24 May 2007, 03:31
Thanks, I've sorted out the multi-resolution issue with the icons.

Windows will only use the first icon, however if that icon is a "multi-icon file" it'll select the correct resolution from within the icon file...
Post 24 May 2007, 03:31
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.