How to specify the def. icon for my app.

I´m developing an MFC application, and have problems specifying which icon from the resource that should appear as default in, for example, Explorer.

When I look at my application's exe-file with Explorer another icon (always the first one in the resource) is shown. How do I select the icon to be shown as default for my application? I could change the resource name of the icon in order to get it to the top of the list of resource icons, but that's not really the solution I want.

Anybody have a better suggestion?

//Andreas

assermarkAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
chensuConnect With a Mentor Commented:
The icon with the lowest ID is the application icon. Just change the ID of the icon to be the lowest, which you want to appear in Windows Explorer. This is the way Windows Explorer works.
0
 
leflonCommented:
1.) you may change the IDR_MAINFRAME icon in your resources to the icon you would like for your app (remember to change both the 32x32 and 16x16)

2.) or you load a different icon on program start
with
a. LoadIcon() for an dialog based app
b. LoadFrame(), LoadToolBar() for a doc/view app
0
 
assermarkAuthor Commented:
Thank you,

It seems to work this way!

//Andreas
0
All Courses

From novice to tech pro — start learning today.