Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
tools
vsnet.act
vsnet.debugging
vsnet.documentation
vsnet.enterprise.tools
vsnet.general
vsnet.ide
vsnet.jlca
vsnet.servicepacks
vsnet.setup
vsnet.vsip
vsnet.vss
vsnet.vstools.office
vstudio.development
vstudio.extensibility
vstudio.general
vstudio.helpauthoring
vstudio.setup
vstudio.sourcesafe
  
 
date: Tue, 02 Sep 2008 09:30:38 GMT,    group: microsoft.public.vstudio.development        back       


Adding an icon to a Visual C++ executable   
I am using Visual C++ 2005 to create an application program, and I 
have a small problem properly adding an icon to it.

   I have created an .ico file (using the Gimp) which has 16x16, 32x32 
and 48x48 versions of the icon, and for each a 4-bit, an 8-bit and a 
32-bit version (in other words, 9 versions of the icon in total). I have 
added the .ico file as a resource in the project.

   The icon works perfectly when I view the application .exe file with 
Windows Explorer in all modes (the details view uses the 16x16 version, 
the icons view uses the 32x32 version, and the tiles view uses the 48x48 
version). Also when I start the application, the 16x16 version correctly 
shows in the Windows task bar.

   However, the small icon on the upper left corner of the application 
window does *not* show any version of my icon. Instead, it shows the 
generic "application" icon (that which looks like an empty window). Also 
when I switch tasks with alt-tab, my application shows as that generic 
application icon instead of my own icon.

   Why is this, and how do I make it use my icon in those situations as 
well? I can't understand what I'm doing wrong.
date: Tue, 02 Sep 2008 09:30:38 GMT   author:   Juha Nieminen lid

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us