Thread: Sequence of icons

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    70

    Sequence of icons

    Hello to all,

    I have several icons defined in resource part of my exe file. When the system paints the icon in the directory folder or elsewhere, it is obviously one of those it has found in the exe's resources.

    Now the question.

    How the system decides what icon to display, if I have many of them. I think it displays the first one found in the resource section of exe, but I am not sure. If this is true, how can I determine what icon should be the first. I noticed, that Visual C++ resource editor sorts the icon identifiers alphabetically to make the order (it does so for every type of resource). That order is also kept in the exe file, I think, but I have no control over this process. Except perhaps of stupid making identifier names to keep certain order. Could anyone clarify this for me?

  2. #2
    Registered User
    Join Date
    Dec 2001
    Posts
    70

    Correction

    Visual C++ resource editor sorts the icon identifiers alphabetically to make the order (it does so for every type of resource). That order is also kept in the exe file.
    It does not even depend on the alphabetical order of identifiers as I thought. I had to change ID values in resource.h manually. The smallest value of icon ID made the icon to be main of the program.

    But I don't like this approach and everyone knows that manual rewritting of resource.h is debatable.

  3. #3
    Registered User
    Join Date
    Jan 2002
    Posts
    363
    u should be happy ur not stuck using mingw. then it'd be handwritten resources the whole way
    but u get used to them after a while. . . . .

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. [C] Problem with icons in a toolbar
    By pc2-brazil in forum Windows Programming
    Replies: 3
    Last Post: 12-22-2008, 11:04 PM
  2. Immediate programming help! Please!
    By xMEGANx in forum C++ Programming
    Replies: 6
    Last Post: 02-20-2008, 12:52 PM
  3. sequence
    By braddy in forum C Programming
    Replies: 2
    Last Post: 03-30-2006, 02:15 PM
  4. wsprintf and format specifiers
    By incognito in forum Windows Programming
    Replies: 2
    Last Post: 01-03-2004, 10:00 PM
  5. How do I restart a random number sequence.
    By jeffski in forum C Programming
    Replies: 6
    Last Post: 05-29-2003, 02:40 PM