Click to See Complete Forum and Search --> : How to get a Handle to CommonControls Standardicon


AlionSolutions
July 18th, 2003, 04:01 PM
Hi,
I'm trying to get a Handle to a standard Icon of CommonControls. I tried the folowing but it allways returns NULL. I called InitCommonControls before.

HANDLE h = LoadIcon(HINST_COMMCTRL,MAKEINTRESOURCE(STD_COPY));

I would appreciate any help on this.

Thanx in advance

Juergen

rxbagain
July 18th, 2003, 11:58 PM
STD_COPY is not an ICON resource in COMCTL32.DLL. It is an index to the toolbar BITMAP resource. If you have ResHacker, you can see these resources and can pick the correct function to it.

HINST_COMMCTRL also is used only in messages and functions for COMCTL32 to indicate that it is the DLL's instance to be used, if you want to use its instance in loading it's resources manually (I mean do it by yourself), you have to use LoadLibrary and use the return value.

Hope it will clarify your concern.