One more thing I would like to mention.
I do have AFX_MANAGE_STATE(AfxGetStaticModuleState()); as the very first
statement in f()

"Arun" <arun_co@yahoo.com> wrote:
>
>
>I have a Modal Dialog resource and a corresponding CDialog derived class
>(CMyDialog) in a My.DLL (DLL type is --Use MFC in a Shared DLL).
>
>I have an exported function f() in My.DLL that instantiates CMyDialog and
>calls its DoModal() function.
>
>In my EXE, I AfxLoadLibrary() the DLL, and I GetProcAddress() of the DLL
>function f(). I am able to call f(), that creates a CMyDialog instance.

But,
>when the DoModal() function is called nothing happens.
>
>I have no clue why the DLL won't display the modal dialog. Help please.
>