Article ID: 161589
Article Last Modified on 10/16/2002
"If you have a resource in your DLL, such as a dialog, you need to use the macro AFX_MANAGE_STATE to switch the MFC module state correctly, so that Windows looks in the DLL and not in the EXE for the resource. This can be done by adding the following line of code to the beginning of functions exported from the DLL:
AFX_MANAGE_STATE(AfxGetStaticModuleState( ))"This is incorrect. Extension DLLs do not need to add this macro at the top of every exported function . The AFX_MANAGE_STATE macro can be used inside of callbacks or custom window procedures to properly adjust the current module state, but it should be used with AfxGetAppModuleState() or a specific module state instance instead of AfxGetStaticModuleState().
Keywords: kbbug kbfix kbvc420fix kbdll kbdocfix kbdocerr KB161589