Click to See Complete Forum and Search --> : good handle of resource


May 12th, 1999, 04:12 AM
Is it possible to force every functions defined in an extension DLL to use by default the resources of its DLL without use everytime the function
AfxSetResourceHandle(GetModuleHandle("filename.dll"));
before ?

The probleme appears when you have the same ID in many resource handles!

Dave Lorde
May 12th, 1999, 04:25 AM
I don't know any way around this, but it only needs to be done for exported functions that will use resources.

It's probably simpler and quicker to use AfxGetResourceHandle() once to get your DLL handle at initialisation time and use this for the argument to AfxSetResourceHandle() in each function.

Dave