CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    Why need MFC Extend DLL

    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?


  2. #2
    Join Date
    Apr 1999
    Location
    Malaysia
    Posts
    224

    Re: Why need MFC Extend DLL

    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!!!

  3. #3
    Guest

    Re: Why need MFC Extend DLL

    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).


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured