DWT Windows Load Icon from File/Program/Resource
JamesD via Digitalmars-d-dwt
digitalmars-d-dwt at puremagic.com
Sat Feb 25 00:45:40 PST 2017
I'm a hobbyist and new to the D language. With a lot of help
from various online resources, I finally figured out how to load
an icon from:
1. A file "icon.ico" (this was easy)
2. A Program extension from the Windows registry, e.g. "*.inf"
(harder)
3. A linked resource from the exe itsself (very hard)
I learned how to add an icon to the exe with a compiled Resource
file.
Now I can load this embedded icon as the shell icon.
And I don't have to distribute a separate ico file with my exe.
I added a couple of simple bat files to compile with either dmd
or dub.
This work can be found at:
https://github.com/jasc2v8/dwt-support/tree/master/windows/example-load-icon
I hope this helps another newbie like me.
Constructive feedback is welcome.
More information about the Digitalmars-d-dwt
mailing list