| |

VerySource

 Forgot password?
 Register
Search
View: 1670|Reply: 14

Ask everyone a question, how to change the icon of the MFC program generated by vc?

[Copy link]

1

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-3-22 13:30:01
| Show all posts |Read mode
I have built a single-document application. I want to change the icon, but I ca n’t change it.
Reply

Use magic Report

1

Threads

27

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-7-9 11:15:01
| Show all posts
Find the corresponding icon in the resource view
Reply

Use magic Report

0

Threads

41

Posts

28.00

Credits

Newbie

Rank: 1

Credits
28.00

 China

Post time: 2020-7-9 16:00:01
| Show all posts
There is an ico icon file under the project file, just replace your own icon file
Reply

Use magic Report

0

Threads

20

Posts

21.00

Credits

Newbie

Rank: 1

Credits
21.00

 China

Post time: 2020-7-9 19:00:01
| Show all posts
In the function int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
SetIcon(AfxGetApp()->LoadIcon(ICO_ID/*icon ID*/), TRUE);
Reply

Use magic Report

2

Threads

20

Posts

12.00

Credits

Newbie

Rank: 1

Credits
12.00

 China

Post time: 2020-7-9 21:30:02
| Show all posts
It seems that the icon of the EXE file has changed, but the icon in the upper left corner of the window has not changed
Reply

Use magic Report

2

Threads

20

Posts

12.00

Credits

Newbie

Rank: 1

Credits
12.00

 China

Post time: 2020-7-9 22:30:02
| Show all posts
Changed, sorry
Reply

Use magic Report

1

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-7-10 15:15:01
| Show all posts
You can try it, it seems to not take effect after the resource view is changed
Reply

Use magic Report

0

Threads

3

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-7-10 15:30:01
| Show all posts
Modify the icon given by the program yourself, or load your own new icon in OnCreate
Reply

Use magic Report

1

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-7-10 15:45:01
| Show all posts
Modify it directly in IDR_MAINFRAM, nothing can be changed, you can try
Reply

Use magic Report

0

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-7-10 23:15:01
| Show all posts
Replace the icon under the res directory.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list