I have got dll staticly linked to mfc.
In the dll is dialog class located.
I call exported function from main program.
void __stdcall ShowMMInfo(DWORD id, HWND parent)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
CMainDialog dlg(CWnd::FromHandle(parent));
dlg.DoModal();
}
In DoModal occures an unhandled exception in the line
if (CreateDlgIndirect(lpDialogTemplate,
CWnd::FromHandle(hWndParent), hInst))
What can be wrong?
Update:
I have replaced Skin Controls from our library with mfc controls. After that program begun work well.
But i need Skin controls in that dialog.
In main program skin controls work well.
What should i do to make skin controls to load well?
I just added lib file to link and include header files.
I took a look with hdependency walker: there are skin controls classes.
But when i replace for example CDialog with CSCScaleDialog i got an exception.
I tryed to link staticly and dinamicly to main program, but there is no difference.