tags:

views:

190

answers:

4

Hi there,

I am new to this MFC stuff, I am working on a project, where i need to use class CFileFind which is in MFC. how can I link to my regular VC++ program to use that class.

I am completely new to MFC, n apologize if there is a mistake.

thanks in advance.

A: 

You'll either need to make your other program an MFC application, or you'll need to encapsulate the MFC stuff in an MFC DLL and invoke the DLL from your application.

Gerald
+5  A: 

Why not just use the Windows API directly, via FindFirstFile, FindNextFile, and FindClose?

MFC will add a lot of overhead... if you're just using it for this, it's a waste. I would only consider MFC if you're planning to write large portions of your application using the whole MFC framework.

That being said, I'd actually recommend avoiding MFC altogether unless you have a reason to use it. There are many other clean, easy to use frameworks if you need an entire GUI framework, such as Qt.

Reed Copsey
+2  A: 

Include afx.h and look at the general project settings. There should be an option to specify that you want to use MFC either as shared DLL or static library.

What version of Visual Studio are you using?

ggponti
A: 

thanx for ur reply.

but I am still not getting how to link MFC to my program

thanks for ur time.