Microsoft KB Archive/100637

From BetaArchive Wiki
Knowledge Base

INFO: Specifying Icons for Console Applications in Windows NT

Article ID: 100637

Article Last Modified on 6/4/2001


  • Microsoft Visual C++ 1.0 Professional Edition

This article was previously published under Q100637


In the OS/2 operating system, when you add an application to a program group and an icon (.ICO) file is available that has the same base name as the application, OS/2 displays the icon in the group file. This process does not occur automatically in Microsoft Windows NT; the system displays a generic icon for the item even when an icon with the same base name is also present.

To specify the icon to appear in the program group, perform the following three steps:

  1. Create a resource (.RC) file that contains an ICON statement, such as the following:

          ConApp ICON ConApp.ICO
  2. Use the resource compiler (RC.EXE) to compile the resource file. In the Visual Workbench, just add the .RC file to the list of files in the project.
  3. Link the compiled resource file into the application's executable file.

Unlike the resource compiler provided with the 16-bit Windows development system, RC does not include compiled resources into the executable file or specify the execution environment for the application. The linker recognizes compiled resource files and includes them in the executable file.


If you start an application by clicking its icon in Program Manager or by running it from the File menu in Program Manager and minimize the application, the system displays the icon specified in the resource file.

If you start the application from the MS-DOS prompt and minimize the application, the system displays the icon used for the MS-DOS prompt.

Keywords: kbinfo KB100637