Resource ID numbers - Programmer

This is a discussion on Resource ID numbers - Programmer ; In my application's .rc file, I have: 100 ICON myapp.ico Then, in the Registry, I have: DefaultIcon [REG_SZ] C:\path\to\myapp.exe,100 However, that doesn't make the icon show up. If I change "100" to "0" then it works. Why? Isn't the number ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Resource ID numbers

  1. Resource ID numbers

    In my application's .rc file, I have:

    100 ICON myapp.ico

    Then, in the Registry, I have:

    DefaultIcon [REG_SZ] C:\path\to\myapp.exe,100

    However, that doesn't make the icon show up. If I change "100" to "0"
    then it works. Why? Isn't the number to the left of the resource the ID?

    - Paul

  2. Re: Resource ID numbers


    "Paul J. Lucas" wrote in message
    news:gA3Zj.71$xZ.16@nlpi070.nbdc.sbc.com...
    > In my application's .rc file, I have:
    >
    > 100 ICON myapp.ico
    >
    > Then, in the Registry, I have:
    >
    > DefaultIcon [REG_SZ] C:\path\to\myapp.exe,100
    >
    > However, that doesn't make the icon show up. If I change "100" to "0"
    > then it works. Why? Isn't the number to the left of the resource the ID?


    No, i believe it's the index. Note that if you have many named icon
    resources then order is based on then name and by default the first icon is
    used in shortcuts etc. So i usually name my default icon "0something".

    - Sten



+ Reply to Thread