+ Reply to Thread
Results 1 to 2 of 2

Thread: MFC exported DLL GUI issue.

  1. #1

    MFC exported DLL GUI issue.

    Hi All,

    I have an MFC application and an MFC style DLL.

    MFC application uses exported procedure from MFC DLL but it fails.

    What could be the reason?


  2. #2

    It is not 100% clear from your question what is the actual issue.

    Let me try to answer your question.

    If you have MFC style DLL which has some resource and you want to display them like make a CDialog object and call DoModal then follow the below pattern:

    extern "C" __declspec(dllexport) void CreateDialog()
    //this is the statement you should add as first statement on each exported function.
    AFX_MANAGE_STATE( AfxGetStaticModuleState( ) ) ;

    CDialog *pDialog = new CMyDialog() ;
    pDialog->DoModal() ;

    For more information on AFX_MANAGE_STATE:


+ Reply to Thread


Posting Permissions

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