Results 1 to 2 of 2

Thread: Dialogs in DLLs

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Location
    Cardiff, UK
    Posts
    8

    Dialogs in DLLs

    I have my main program which creates some of it's own dialogs by doing things such as:


    Code:
    CHLDlg *dlg = new CHLDlg(NULL);
    dlg->Create(IDD_HLCONFIG, NULL);

    This works fine in the main exe. However, I want to be able to create dialogs from withing plugins (MFC Dlls) and pass them out to the main exe to be used in the same way. When Create gets called, an Assert fails which this comment next to it: invalid dialog template name

    Any idea how I can create these dialogs?

  2. #2

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Location
    Cardiff, UK
    Posts
    8
    Ok, I just made a call to
    AFX_MANAGE_STATE(AfxGetStaticModuleState());
    before creating the dialog, works fine now

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