Re: [AD] Application icon in Windows |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> I take it this implies that Allegro first looks for a resource named
> `allegro_icon' and then for one named `IDI_APPLICATION'. However, if it
> doesn't find `allegro_icon', it uses a default Windows icon even if the
> resources for the program specify IDI_APPLICATION. At least, that's what
> happens under MinGW.
That's exactly what was intended.
> I've attached a patch that makes Allegro check the IDI_APPLICATION
> resource for the running program prior to falling back on the Windows
> default.
I disagree to your patch: IDI_APPLICATION is a system icon and overloading
it is just an ugly hack. The right way of loading it is really
LoadIcon(NULL, IDI_APPLICATION), not LoadIcon(user_inst, IDI_APPLICATION)
(see the Platform SDK docs).
--
Eric Botcazou
ebotcazou@xxxxxxxxxx