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?


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
a. LoadIcon() for an dialog based app
b. LoadFrame(), LoadToolBar() for a doc/view app
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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
assermarkAuthor Commented:
Thank you,

It seems to work this way!

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.