-
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?
-
Ok, I just made a call to
AFX_MANAGE_STATE(AfxGetStaticModuleState());
before creating the dialog, works fine now :)