Solved

CFileFind problems

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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 gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now