This topic has not yet been rated - Rate this topic

AfxSetResourceHandle

Use this function to set the HINSTANCE handle that determines where the default resources of the application are loaded.

void AFXAPI AfxSetResourceHandle(
   HINSTANCE hInstResource 
); 

Parameters

hInstResource
The instance or module handle to an .EXE or DLL file from which the application's resources are loaded.

Example

BOOL CMyApp::InitInstance()
{
   //Default Application Wizard code.
   HINSTANCE hRes = NULL;
   hRes= LoadLibrary("ResourceD.dll");
   if(hRes)
      AfxSetResourceHandle(hRes);
   //Rest of wizard code
   return CWinApp::InitInstance();
}

See Also

MFC Macros and Globals | AfxGetInstanceHandle | AfxGetResourceHandle

Did you find this helpful?
(1500 characters remaining)