Thanks in advance
Retrieve embedded icon filename?
Retrieve embedded icon filename?
With GetClassLongPtr_(hWnd, #GCL_HICON) I get the handle of the associated icon from my app... But is it possible to retrieve the original filename too? (e.g. MyIcon.ico)
Thanks in advance
Thanks in advance
Et cetera is my worst enemy
- netmaestro
- PureBasic Bullfrog

- Posts: 8452
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: Retrieve embedded icon filename?
Not sure whether you mean any program or a PB-compiled program. I have many PB-compiled programs and I loaded one of them in a hex editor and searched for the filename of the icon the compiler was set to use when it generated the exe. Not found. So you probably can't retrieve that information from the compiled exe. The compiler would have to deliberately store it and I guess it just doesn't.
BERESHEIT
Re: Retrieve embedded icon filename?
Icons on Windows are stored in a resource section and are referenced by ID / index and not by filename.
The "filename" of the icon is basically the filename of the executable itself, so I doubt that there is a way
to retrieve it.
The "filename" of the icon is basically the filename of the executable itself, so I doubt that there is a way
to retrieve it.
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
Re: Retrieve embedded icon filename?
Thanks to both of you for your explanations! I already searched a few files with a hex editor but couldn't find anything related to the icon name. I was hoping that there's a magic function somewhere I don't know. Guess I have to stick with "App.ico" as description 
Et cetera is my worst enemy
