![]() |
User DLL doesn't work when using CButton
I am trying to make a user DLL which includes the MFC derived class CButton (or really any MFC class). If I leave the CButton class out the dll runs great. As soon as I include the CButton member the executable causes a trap as soon as DoModal is called. Any ideas?
#define DLLAPI _declspec(dllexport) class MyClass : CDialog { DECLARE_DYNAMIC(MyClass) public: DLLAPI MyClass(); DLLAPI DoModal(); CButton aBtn; } |
Re: User DLL doesn't work when using CButton
You probably need to see what is there in DoModal() - If you have overridden it or if you have something in the class which you have missed to initialize.
|
Re: User DLL doesn't work when using CButton
I don't think it's in DoModal. The program will show the dialog, but after returning and making a call to SetResourceHandle I get e run time error that says the stack around aDlg has been corrupted. The calling program and class header are below.
Code:
#define APIDLL _declspec(dllimport) |
Re: User DLL doesn't work when using CButton
Try running in the debug mode and see where the program is crashing or giving any ASSERT.
|
| All times are GMT +5.5. The time now is 05:02. |