Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / March 2005

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kjell Arne Johansen - 27 Feb 2005 13:49 GMT
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
Carl Daniel [VC++ MVP] - 27 Feb 2005 15:13 GMT
> 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
Kjell Arne Johansen - 28 Feb 2005 14:45 GMT
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

> > Hi
> > How to integrate an MFC 7.0 DLL into a standard C++ application.
[quoted text clipped - 8 lines]
>
> -cd
Carl Daniel [VC++ MVP] - 28 Feb 2005 15:22 GMT
> Hi
>
[quoted text clipped - 7 lines]
>
> 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
Kjell Arne Johansen - 01 Mar 2005 09:35 GMT
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

> > Hi
> >
[quoted text clipped - 17 lines]
>
> -cd

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.