icon for the executable

This is a discussion on icon for the executable within the Windows Programming forums, part of the Platform Specific Boards category; how does one make the icon integrated with the EXE file without having a separate ICO file? can anyone help?...

  1. #1
    Unregistered
    Guest

    Question icon for the executable

    how does one make the icon integrated with the EXE file without having a separate ICO file?

    can anyone help?

  2. #2
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    Technically, i believe that you cannot physically have a file icon without an external .ico file. The icon is not generated by the exe and displayed in, for example, the windows explorer pane. The exe is associated with an external .ico file and are displayed together by windows, so in response, i don't believe what you want is possible.

    [edit]
    note: same applies if you are referring to what is displayed in the window of your program at runtime (if it's a windows program). You will still have to have the physical file, but with a program like MSVC (possible dev c, i don't know how it uses project files) it will encode the icon's 1's and 0's into the .exe file...unless otherwise specified by you the developer. So either way you look at it, you can't code an icon, which is what you were sort of lending to with your question. You can code all sorts of other images, but you can't use them exactly how an icon is used...getting really technical here: you could create an executable that creates an image you coded, ofstream the bits into it's own file (.ico extension of course) and then import that as your icon, that gives you more flexibility than drawing a pic with a paint program. So have fun.
    [/edit]
    Last edited by Waldo2k2; 06-09-2002 at 08:07 PM.
    PHP and XML
    Let's talk about SAX

  3. #3
    Registered User
    Join Date
    Dec 2001
    Posts
    421
    just include the .ico file in as a resource to your windows exe. when the program is compiled, the icon will be displayed instead of the default windows icon.

    Waldo2k2: i had no idea what the hell you said! you seemed to contradict yourself in a couple of spots.

    U.

  4. #4
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    it was a late night...well, more like i had been up for the last 24 hours or so, i basically meant that he seemed like he was hinting towards wanting to be able to say, code an image and that be his icon, i told him how windows associates the icon with the exe when you include it as a resource as you pointed out. Then the hamster got back on the wheel and i started to ramble...
    PHP and XML
    Let's talk about SAX

  5. #5
    Registered User
    Join Date
    Dec 2001
    Posts
    421
    hehe... I completely understand

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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 04-10-2009, 12:57 AM
  2. CreateProcess with Resource of executable, not the Filename
    By Ktulu in forum Windows Programming
    Replies: 4
    Last Post: 11-04-2006, 12:07 AM
  3. Change the icon on executable
    By caroundw5h in forum Windows Programming
    Replies: 4
    Last Post: 11-20-2003, 10:25 PM
  4. Creating an icon for an executable
    By funkydude9 in forum C++ Programming
    Replies: 1
    Last Post: 09-28-2002, 12:35 AM
  5. icon in title bar?
    By Unregistered in forum Windows Programming
    Replies: 3
    Last Post: 12-12-2001, 05:43 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21