Changing Icon 
Author Message
 Changing Icon

I created a MFC SDI app from AppWizard WITHOUT doc/view
support. The app runs fine, but the icon shown on the
caption bar is not the usual "MFC" icon (that appears on
the about box). How can I change this icon? Thanks in
advance.


Tue, 26 Apr 2005 06:54:00 GMT  
 Changing Icon
Add a HICON member variable in the MainFrm.h
HICON m_hIcon;
and in the CMainFrame ctor add:
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
Finally add the following somewhere in the OnCreate
function:
SetIcon(m_hIcon, TRUE);

Binoy

Quote:
>-----Original Message-----
>I created a MFC SDI app from AppWizard WITHOUT doc/view
>support. The app runs fine, but the icon shown on the
>caption bar is not the usual "MFC" icon (that appears on
>the about box). How can I change this icon? Thanks in
>advance.

>.



Tue, 26 Apr 2005 07:26:59 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to change icon in specific case?

2. Change Icon Revisited

3. changing icon of an addin,please help!!

4. How to change icon in specific case?

5. Change Icon in specific case

6. Change icon of an exe file

7. change icon

8. How to change icon for console application?

9. change icon of a console application

10. Changing Icons

11. Custom IE Toolband : Change icons on mouse move

12. How to change Icon on the Title Bar

 

 
Powered by phpBB® Forum Software