DontPanic
DontPanic

Reputation: 2416

LoadImage (LoadIcon) from ICO file containing multiple icons

I'm trying to load and draw an icon from an .ICO file that contains multiple icons. I can't figure out how to load a specific icon. I'm using LoadImage as in the following code

    {
      char *iconfile="myicon.ico";
      int w=72,h=72;
      hIcon = LoadImage( hMainInst, iconfile, IMAGE_ICON, w, h, LR_LOADFROMFILE );  
    }

This works Ok but the only way I can see to select a specific icon is by size, e.g., 72x72 in my example. It seems to load the first 72x72 icon in the file. The problem is that there are multiple 72x72 icons in the file.

How do I load an icon other than the first?

Upvotes: 0

Views: 750

Answers (0)

Related Questions