Thread: using .ico files

  1. #1

    using .ico files

    how do i use an ico (icon) with my C program. i made the icon, but I don't know how to use it instead of the standard exe icon

  2. #2
    Anal comment spacer DominicTrix's Avatar
    Join Date
    Apr 2002
    If its a DOS program you can right click your program file and select properties; you can change the icon from there. (This will simply create a shortcut to the file with your icon).

    If its a win32 program you need to make an icon resource and assign it to your main windows class; e.g.
    wincl.hIcon = LoadIcon(hThisInstance, MAKEINTRESOURCE(ID_MYGAYICON));
    wincl.hIconSm = LoadIcon(hThisInstance, MAKEINTRESOURCE(ID_MYGAYICONSMALL));


  3. #3



  4. #4
    Registered User
    Join Date
    Dec 2001
    not just that, but the icon that will appear in windows explorer will be the first one it comes across in the program exe. so if you have more than one icon in your exe, make sure that the one you want to show in explorer is the one with the lowest resource ID, or the one that comes first alphabetically.

    nice "feature" huh!?

    Quidquid latine dictum sit, altum sonatur.
    Whatever is said in Latin sounds profound.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Create Copies of Files
    By Kanshu in forum C++ Programming
    Replies: 13
    Last Post: 05-09-2009, 07:53 AM
  2. *.cpp and *.h files understanding
    By ElastoManiac in forum C++ Programming
    Replies: 4
    Last Post: 06-11-2006, 04:45 AM
  3. Linking header files, Source files and main program(Accel. C++)
    By Daniel Primed in forum C++ Programming
    Replies: 3
    Last Post: 01-17-2006, 11:46 AM
  4. Multiple Cpp Files
    By w4ck0z in forum C++ Programming
    Replies: 5
    Last Post: 11-14-2005, 02:41 PM
  5. Folding@Home Cboard team?
    By jverkoey in forum A Brief History of
    Replies: 398
    Last Post: 10-11-2005, 08:44 AM