Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

CFileFind problems

Posted on 1998-12-07
3
Medium Priority
?
798 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 120 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

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…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

688 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