How to integrate an MFC 7.0 DLL into a standard C++ application

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
How to integrate an MFC 7.0 DLL into a standard C++ application.

I'm going to use an OPC Toolkit for C++ and have to interface my MFC DLLs.
How do I do this?
Any recommendations? Links?

Regards
Kjell Arne Johansen
 
Kjell said:
Hi
How to integrate an MFC 7.0 DLL into a standard C++ application.

I'm going to use an OPC Toolkit for C++ and have to interface my MFC
DLLs. How do I do this?
Any recommendations? Links?

Um.. just do it? MFC is just "standard C++" afterall.

Is there something in particular that you're looking for?

-cd
 
Hi

I just included my exported include file from the MFC DLL and got a lot of
error messags during compilation, -without using the interface classes at all.

If I inlcude the same header file in an MFC based executable it compiles
fine and there is no problem using the interface classes.

Suggesstions?

Thanks.

Kjell Arne
 
Kjell said:
Hi

I just included my exported include file from the MFC DLL and got a
lot of error messags during compilation, -without using the interface
classes at all.

If I inlcude the same header file in an MFC based executable it
compiles
fine and there is no problem using the interface classes.

Suggesstions?

You need to include some basic MFC header(s) before including your class
header. MFC class headers generated by the class wizard are not complete -
they presume that you've already included the MFC headers themselves.

You could help our by posting a few of the error messages. You'd also
probably get a more precise resolution by posting to
microsoft.public.vc.mfc.

-cd
 
Thank You

I try to include MFC stuff in stdafx.h but then I get the error message
c:\Program Files\Microsoft Visual Studio
..NET\Vc7\atlmfc\include\afxv_w32.h(18): fatal error C1189: #error :
WINDOWS.H already included. MFC apps must not #include <windows.h>

I probably have set a flag somewhere?

Kjell Arne Johansen
 
Back
Top