I create icons in my application using LoadIconWithScaleDown(). I will also return to CreateIconFromResourceEx()if the preferred feature is not available.
LoadIconWithScaleDown()
CreateIconFromResourceEx()
The documentation for DestroyIcon()states:
DestroyIcon()
You only need to call DestroyIcon for icons and cursors created with the following functions: CreateIconFromResourceEx (if called without the LR_SHARED flag), CreateIconIndirect and CopyIcon. Do not use this feature for a common icon. The common icon is valid as the module from which it was loaded remains in memory. The following functions receive a common icon.LoadIconLoadImage (if you use the LR_SHARED flag)CopyImage (if you use the flag LR_COPYRETURNORG and hImage is a common icon)CreateIconFromResourceCreateIconFromResourceEx (if you use the LR_SHARED flag)
You only need to call DestroyIcon for icons and cursors created with the following functions: CreateIconFromResourceEx (if called without the LR_SHARED flag), CreateIconIndirect and CopyIcon. Do not use this feature for a common icon. The common icon is valid as the module from which it was loaded remains in memory. The following functions receive a common icon.
Note. I do not pass LR_SHAREDin CreateIconFromResourceEx(); perhaps I should.
LR_SHARED
What would I like to know, do I need to call DestroyIcon()for icons made with LoadIconWithScaleDown()?
, , HICON, , -, . Windows, , , , , , , LR_SHARED, , , , .