Solved

CFileFind problems

Posted on 1998-12-07
3
796 Views
Last Modified: 2013-11-20
I want to use the function CFileFind::FindFile in my program. But whenever i try to compile i get the error, FindFile undeclared identifier.

Is there any particular library i have to include? If not, how do i get rid of this error?

Thanks
0
Comment
Question by:GreatOne
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
perrizo earned 30 total points
ID: 1325842
Try using...

#include <afx.h>

That should work.
0
 

Author Comment

by:GreatOne
ID: 1325843
I tried including <afx.h> and that didnt help. Any other suggestions?
Here is the code i am using, maybe it will help.

#include <afx.h>

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,

LPSTR lpCmdLine, int nCmdShow)
{
      FindFile("wab.exe", 0);
}

0
 
LVL 1

Expert Comment

by:perrizo
ID: 1325844
Well...

You first would have to declare yourself an object of the CFileFind class...

CFileFind file;

then after that you have to call the function through its owner object...

file.FindFile("Wab.exe", 0);

this should do it.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question