Tibi
Tibi

Reputation: 3875

How to read icons from .exe and .dlls in C++/Qt (on windows)?

How can I read the icons from a DLL or an EXE file, using C++ (and Qt) ?

I can't find anything relevant on google, I only get how to change application icon using qt, which is not what I need.

Upvotes: 3

Views: 2903

Answers (1)

Bart
Bart

Reputation: 20030

If I understand what you're trying to do, this should be possible through the general LoadResource function or the specific LoadIcon function. An example of the former can be found here.

You would create a handle to the exe or DLL using LoadLibrary, which you subsequently use as an argument in the LoadResource or LoadIcon function.

I don't know of any Qt functions providing similar options, but perhaps others do.

Upvotes: 6

Related Questions