• 0

[c/c++] external dll file resources


Question

2 answers to this question

Recommended Posts

  • 0

You call LoadIcon with the HMODULE of the DLL containing the resource that you want. To get the HMODULE of the DLL, you can use GetModuleHandle if the DLL is already loaded (e.g., if it's listed in your app's import table) or LoadLibrary otherwise (be sure to remember to FreeLibrary after you are done).

(If targeting NT6+, you may want to consider using LoadIconMetric or LoadIconWithScaleDown instead of LoadIcon if the icon will be scaled and you want the scaling to use a newer, better algorithm.)

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.