It doesn't matter where you launch your dialog from. Once you know how to launch it from exe, the same technique is applicable to launching from dll. Sample attached. Here you can see how CYourDialog gets launched from client.exe and my.dll using the same AFX_MANAGE_STATE.
Thanks for your sample code. When I run the make file in my computer from command line, the system complained that "rc" and "cl" is not recognized as an external or internal command. And then I create a MFC dialog based project in VC2010 and put all of your files into the project. When I build this project, I got a linker error " LNK1104: cannot open file 'my.lib' ". I attached this project with this post. Would you please tell me what I am missing? Thanks.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.