Solved

CFileFind problems

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
string initialization in java 11 115
VBA "SendKeys" Syntax for Multiple Keystrokes 7 118
Line meaning 9 88
Dell Alienware Graphics Amplifier Driver for non-Alienware systems 18 357
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

821 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