Export (0) Print
Expand All
MFC
TRY
Expand Minimize
2 out of 7 rated this helpful - 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.

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();
}
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.