Link to home
Start Free TrialLog in
Avatar of stev75
stev75

asked on

want resource templates export from dll

I have an MFC dll where I comfortably use the AFX_CLASS_EXPORT to export complete classes.
on of them is a CDialog derived class which has some resource template.

The point is, when I call dlg.DoModal() in my app, it returns -1 because it searches the Resource in the app , not the dll. How do I call doModal on the exported instance, and load the resource from the dll ?

class AFX_CLASS_EXPORT CMyDllDlg : public CDialog
{...
}

app.exe:

dlg CMyDllDlg; // OK
dlg.DoModal() // resource problem!

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Janusz Czopowik
Janusz Czopowik
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of stev75
stev75

ASKER

i had to switch to the "extension dll". Then with your additions, it works well.