
non-mfc calling mfc example
Quote:
>I need an example or two of a non-mfc application calling a mfc dll. I
>have two product api's, one sdk is non-mfc and the other is mfc and I
>need to open a mfc dialog in a mfc dll from the non-mfc api dll.
Michael,
I can't find a definitive public sample, but usually all you need to
do is to add the following line to the beginning of any function
exported from the DLL which operates on MFC objects.
AFX_MANAGE_STATE(AfxGetStaticModuleState());
Have a look at TN066 "Regular DLLs Using the MFC Shared Library
Require AFX_MANAGE_STATE in Exported Functions" for a bit more detail.
Dave
----
Address is altered to discourage junk mail.
Remove ".---" for the real address.