I wonder if you weren't able to look at the sample. In there, exe launches CMyDialog defined in regular dll, and CYourDialog is launched from the CMyDialog when the latter is NOT dismissed. And the sample is all about using MFC classes. Larry, you really should pay some more attention to communication you're participating in.Quote:
Basically what happens is that an exe launches CMyDialog defined in MyDll.dll and then when CMyDialog is NOT dismissed, CYourDialog is launched from defined in YourDll.dll. I would really appreciate it if you can post a sample by using MFC.
Well, the answer to the make issue is Visual Studio Command Prompt.
BTW, I have fixed the dialog launching problem. It turns out that one of my DLLs to launch the dialog is a MFC extension dll. I couldn't use AFX_MANAGE_STATE like regular dll. So I have to manually set up the resource handle for this dll. It works. Thank you very much!
I'm currently able to build with the make.bat same successfully in standard Command Prompts of VS2010 and VS2012 Tools, as well as VS .NET2003. In fact I use this approach to make since Visual Studio 4, and never had any problem with this.Quote:
Actually I tried to run vcvarsall.bat from the folder C:\Program Files\Microsoft Visual Studio 10.0\VC. Then if I run your make.bat in project folder, I still got the same errors. It looks like vcvarsall.bat didn't set up the environment for me to run make.bat. What am I missing here?
Its interesting and , I feel that you want to just check out all possibilities in MFC and VC++ .
Your scenarios is Application A loads dll D1 contains dialog "Mydialog"
then dll D1 loads D2 that contains "YourDialog".
Now App is able to load MyDialog from D1 and you want to load YourDialog from D2 in the code of D1.
I agree to the solutions given by Igor , Victor and all others.
Apart from that just one suggestion is instead of doing DOModal() on YourDialog try to invoke it as modal less.
or may be invoking both the dialogs modal less.