WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Functions

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Icons, IconGroups, and IconImages Explained


Question:

What is the correct method to use a specific icon in a multi-icon file? I have created an .ico file using IconXP with multiple icons, but when I try to pick a specific offset, it only shows the default WB icon. If I do not specify an icon offset, it shows the first 32 x 32 24-bit color icon just fine, but if I specify the same icon using the "|#" offset, it doesn't work.

E.g.: Icon file icon.ico with 8 icons

I try to change the icon to the 4th in the set using:

Intcontrol(1007,4,2,"","icon.ico|3") 

but it uses the Winbatch Owl instead.

Answer:

Part of the problem is that icon means two different things at the same time.

Lets make some new words instead, and not use the word "icon"

IconGroup a bunch of related IconImages of various sizes and color depths.

IconImage a specific picture having a unique size and colordepth

An icon.ico file can only have one IconGroup in it. It can have any number of IconImages. These IconImages are usually all related.

A EXE or DLL file can have any number of IconGroups in it.

All the WinBatch functions, when they refer to icons, refer to an IconGroup. You cannot specify anything finer than an IconGroup. Windows, of its own accord, based on screen resolution, video card, and perhaps user preferences will choose an IconImage out of an IconGroup to use. This is beyond the control of the program.


Article ID:   W15951
File Created: 2004:03:30:15:42:00
Last Updated: 2004:03:30:15:42:00