Export (0) Print
Expand All
MFC
TRY
Expand Minimize

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.

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();
}

Community Additions

ADD
Show:
© 2014 Microsoft