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

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
 
C

Carl Daniel [VC++ MVP]

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
 
G

Guest

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
 
C

Carl Daniel [VC++ MVP]

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top