Without linking your DLL to the MFC runtimes, no you won't be able to use any of the MFC classes (such as CObject, etc). The MFC libraries are an annoying overhead, both in terms of performance and size (especially when you have to ship them with a relatively small application) but I think the advantage of having such an extensive framework of pre-written Windows classes far outweighs this.
you can export C type functions rfom a dll by declaring them with #extern "C", instead of classes use handles as the first parameter in the functions. There you'll put the pointer to an MFC object. THe created DLLs shpuld be created as using MFC as statically linked library. Ion Filipski
I am writing an active x control to use another activex control at runtime . I have loaded it using hte typelib and two _D classes were created. When I try to use the instances of the classes XXX.CreateDispatch(_T("The control name"); if failes because this returns 0 any help will be appreciated.
regards
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.