user4137741
user4137741

Reputation:

Cannot change MFC application icon

I'm using visual studio 2013 and I want to change the application icon in my MFC application.

I take .ico file and into res directory and load it to project. When I'm running, the icon isn't changed and stay MFC default icon.

Every icon that I tried to change is overridden by the MFC default icon.

How can Ichange the application icon?

Upvotes: 2

Views: 3216

Answers (1)

Leo Chapiro
Leo Chapiro

Reputation: 13979

Take a look:

The ICON of an MFC executable is the first ICON present in the application.

So, we need to set our ICON as the first ICON, we can set this in “Resource.h”.

Open Resource.h, it may be like this:

enter image description here

Our next step is to change the ICON order as shown:

enter image description here

After you finish changing the application ICON, clean and rebuild your application and check your application ICON.

Upvotes: 1

Related Questions