PDA

Click to See Complete Forum and Search --> : MFC-Related: Is it possible?


amac
Apr 30th, 2002, 07:44 PM
Alright, this is what I am trying to do.

I've created a MFC-DLL with one exported function...
DoSomething()..

In DoSomething() it initialize and SDI/MDI application using MFC same as what would be found in your InitInstance() of the application object.

That way I can have the application contained in a DLL, so that I can open this application from with in a "parent" application from say a menu item ( I don't wanna spawn an executable ). But I could also have a separate executable which only calls the DoSomething() function.

If you are familiar with how the ODBC Administrator works it's the same idea.

I guess what I am asking is... is it possible? Or does the MFC Framework not allow it.

If the only comment you have is how MFC sucks, and API is better... please start a new thread for that. I know doing something like this is easy using API, but the time it would take me to create the interface as aposed to using MFC is why I'd like to stay away from API... if possible....

CornedBee
May 1st, 2002, 02:27 PM
I'm not familiar with MFC-DLLs, but I'd say, why not simply try? Worst thing that can happen is the familiar "debug assertion error".
It may be a problem because the framework of the dll and the one of the exe might not like each other - or something like that. Other than that I see no problem.

amac
May 1st, 2002, 07:18 PM
Oh... I've tried to do it... I just don't know its possible... I could be doing something completely wrong.

Just wanted to see if anyone out there figured something out that I haven't