Click to See Complete Forum and Search --> : Why need MFC Extend DLL


June 9th, 1999, 08:12 PM
It seemed that Regular DLL can do everything. Why we need MFC Extend DLL?
Would anybody please give me a example that MFC Extend DLL can do and Regular DLL can't or MFC Extend DLL can do better than Regular DLL?

balak yap
June 9th, 1999, 09:58 PM
For a very simple eample, when you design you dialog or resourse you can use mouse to "click" one the
"button" and drag into you dialog. After that, you can just dial with CDialog about the event. Those thing
CANNOT do directly from win32 DLL. I can tell you that MFC DLL also use regular DLL to do this, it
act like a "wrapper" DLL to make our work easy and focus on the application only, not the GUI. Just
think, use win32 DLL only, you need to code about 2 or 3 pages to have a do nothing button on a dialog.
But with MFC, you can get it without a line of code.

if you mean you want your application free from any MFC DLL, just compile you application into static
link library.

HTH

Hello World!!!

June 9th, 1999, 10:46 PM
Thank you for your answer, but I think you miss my point. We can do almost everything in VC++ IDE with the Regular DLL, include defining a C++ class derived from MFC(CDialog or CObject and etc...), adding resource in the Resource Editor like you said, and exporting a class derived from MFC to other DLL or Application. Regular DLL can link to dynamic MFC dll or static MFC dll(select when using VC++ AppWizard to create DLL). And Regular DLL can use AFX_MANAGE_STATE simply(only one time in the interface function to create/open dialog) to avoid dialog resource confliction.In MFC Extend DLL we must use AfxSetResourceHandle() to set to DLL resource temporarily every time we implicitly or explicitly use the DLL resource(It's really a hard work & careful-need work).