Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8981617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:22:54+00:00 2026-06-15T20:22:54+00:00

I am porting an old (Visual Studio 6.0) application to Visual Studio 2012 in

  • 0

I am porting an old (Visual Studio 6.0) application to Visual Studio 2012 in order to add some enhancements. The application’s icon in the resources view clearly has 2 versions of the icon, a 32×32 4bit bitmap and a 16×16 4bit bitmap.

In the main AppDlg.cpp there are 2 calls to SetIcon() as follows (created by default by MFC app wizard):

SetIcon(m_hIcon, TRUE);         // Set big icon
SetIcon(m_hIcon, FALSE);        // Set small icon 

However, the icon displayed in the top left corner of the application’s dialog window is the larger one, scaled down to 16×16 instead of the small one. Its also happening for the icon shown in the system tray.

It seems it uses the correct small one for the executable file when viewing it in Windows Explorer (detailed view / list view). So it is picking the small one in some circumstances.

How do I make it choose the smaller 16×16 icon for the top left corner of the dialog box and System tray?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T20:22:55+00:00Added an answer on June 15, 2026 at 8:22 pm

    Known Microsoft bug. See this discussion. (if you do not want to read, just comment out SetIcon(m_hIcon, FALSE) line and you’ll be fine). Please note, that SetIcon only sets the icon on the dialog title bar (small icon) and when you use Alt-tab (big icon)

    The icons you see in the Windows Explorer are the main Application Icons (the icon with the lowest ID in you rc file). It has nothing to do with the main dialog’s SetIcon() method

    The icon in the System Tray is something completely different. Normally, you would use Shell_NotifyIcon API to set the icon, but I bet your project would have a helper class that sets the icon CSystemTray by Chris Maunder is a popular one used by many programmers. Just search for Shell_NotifyIcon in your program to find out exactly what resource is used for the system tray icon

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm porting some old code from C to C++ in Visual Studio 2010 and
I am working on my first Grails application, which involves porting over an old
I am porting quite old corp application from IE to Firefox. Here is my
The project that I've been working on involves porting some old code. Right now
Hi i've been working on a task of porting some code from some old
We are porting an old application that used a hierarchical database to a relational
We are currently working on porting an old VB6 application to WPF. The plan,
I am porting over some old F# code from CTP 1.9.6.8 The code uses
I'm porting an old FoxPro app to Visual FoxPro. The old program of course
I'm porting some old code that uses the int enum pattern to Enum and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.