CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2007
    Posts
    13

    Taskbar icon changing

    This is a strange one...

    I changed my application's icon from the default MFC icon. I didn't like the icon I made, so I changed it yet again. I made sure to change all references to the old icon name *AND* I deleted the old icon from my project folder. The new icon gets displayed properly until I open two windows of my application, in which case the icon in the taskbar changes to the old icon, which doesn't even exist anymore. Note that this only occurs when I run the application from my Debug folder.

  2. #2
    Join Date
    Jun 2001
    Location
    Germany
    Posts
    136

    Re: Taskbar icon changing

    Quote Originally Posted by Paul Fake
    This is a strange one...

    I changed my application's icon from the default MFC icon. I didn't like the icon I made, so I changed it yet again. I made sure to change all references to the old icon name *AND* I deleted the old icon from my project folder. The new icon gets displayed properly until I open two windows of my application, in which case the icon in the taskbar changes to the old icon, which doesn't even exist anymore. Note that this only occurs when I run the application from my Debug folder.
    Any MFC icon can be solve of the problem. You may save it again in the resource directory. Other way is:
    Code:
    HICON hIconNew = AfxGetApp()->LoadIcon(ID_ANY_ICON); // Resource inside

  3. #3
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: Taskbar icon changing

    Make sure your new icon is the FIRST icon in your resources. So give it resource ID 1.
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

  4. #4
    Join Date
    Jun 2001
    Location
    Germany
    Posts
    136

    Re: Taskbar icon changing

    Quote Originally Posted by Marc G
    Make sure your new icon is the FIRST icon in your resources. So give it resource ID 1.
    Yeah... Also can say so.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured