Solved

CFileFind problems

Posted on 1998-12-07
3
793 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

Industry Leaders: 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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

734 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