Do you do something like the following at the entry points to your DLL?
AFX_MANAGE_STATE(AfxGetStaticModuleState( ))
Check this technote here about MFC module state. There are various types of MFC module state, module state is the one you most commonly interact with.
This swaps the current module state
with the state returned from
AfxGetStaticModuleState until the end
of the current scope.
Problems with resources in DLLs will
occur if the AFX_MODULE_STATE macro is
not used. By default, MFC uses the
resource handle of the main
application to load the resource
template. This template is actually
stored in the DLL. The root cause is
that MFC's module state information
has not been switched by the
AFX_MODULE_STATE macro. The resource
handle is recovered from MFC's module
state. Not switching the module state
causes the wrong resource handle to be
used.