Question

I have library that I would like to test. This library was done using MFC. I decided that library is using MFC because these lines in library header file:

#ifndef __AFXWIN_H__
    #error include 'stdafx.h' before including this file for PCH
#endif

I suppose that if I have MFC dll then I must use MFC caller. Correct me if I'm wrong.

I'm not familiar with MFC and I don't need to have these nice windows that gives MFC. This form application that gives wizard looks horrible and it is not easy for me to find how to make button and bind procedure to it.

I just need to call one function in library. Is it possible to create console MFC application for simplicity reason?

No correct solution

OTHER TIPS

Is it possible to create console MFC application for simplicity reason?

sure, under Visual Studio 2005 (should be doable on next versions too):

File -> New Project -> Win32 Console Application -> click Next -> check MFC checkbox -> click finish

You can also in project properties -> General -> select Use of MFC: "Use MFC in a Static Library", this will make .exe file larger, but you wont have problems running this exe on different windows versions.

Yes using this:

 file->New Project->Win32 Console Application->check checkbox empty project->finish

In solution explorer in source:

control->Rightclick(mouse)->Add->NewItem->Select c++ file->Name(program Name)->Add
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top