0% found this document useful (0 votes)
15 views3 pages

C# - dotNET - Easy To Use File Finding Dialog

The document describes CFindFileDlg, a multi-threaded dialog class for searching files on various drives, similar to Windows' 'Find Files or Folders' tool. It allows for wildcard searches, recursive folder searching, and includes features like a cancel button and animated icons. The document also provides integration instructions for adding the dialog to an application and mentions the author's background.

Uploaded by

Fred
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
15 views3 pages

C# - dotNET - Easy To Use File Finding Dialog

The document describes CFindFileDlg, a multi-threaded dialog class for searching files on various drives, similar to Windows' 'Find Files or Folders' tool. It allows for wildcard searches, recursive folder searching, and includes features like a cancel button and animated icons. The document also provides integration instructions for adding the dialog to an application and mentions the author's background.

Uploaded by

Fred
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 3
Easy to use file finding dialog oi An easy to use multi-threaded dialog class that will search disks for files. Similar to Explorer's "Find Files of Folders" tool, * Download demo project - 21 Kb See eis Introduction Because we couldn't find out how to use the Windows “Find Files or Folders” dialog in our own app, and we needed to be able to retrieve a list of the files that were found in our app (which | don't think the Windows dialog even allows you to do), we wrote our own. CFindFileDlg is a simple dialog class that you can use to search hard drives (or floppy, or network, or CDROM drives) for files. It supports wildcards, and recursive folder searching, allows you to end the search after the first file is found, comes standard with a cancel button, simple animated icon and is fully multi-threaded Integrating CFindFileDlg into your own application 1. Add these files to your project: © FileFindDlg.cpp, FileFindDlg.h © FileFinder.cpp, FileFinder.h 2. Copy the IDD_FIND_FILE dialog from the demo resource file to your project 3. Copy the 12 animation icons (IDI_ICON1 -> IDI_ICON12) from the demo resource to your project 4, #include "FindFileDlg.h" in the file where you want to use the dialog. Using CFindFileDlg // declare a search dialog CFindFileDlg dig; dlg.m_csRootFolder = "C:\\"; // root folder of search \_csFindFile = "file.ext"; // file to search for | bRecurse = true; // search subfolders dlg.m_pFindSingleFile = false; // find multiple files // these next three options aren't strictly necessary here, because // we've already specified a root folder. if we Left the root folder // blank (""), the code will search drives A through Z. uw // the options below allow you to exclude certain types of drives dig.m_bSearchNetworkDrives = false; // ignore network drives dig.m_bSearchRenovableDrives = false; // ignore removable drives dig.m_bSearchCDROMDrives = false; // ignore CD-ROM drives // do it. int nResponse = dig.DoModal(); // done if (nResponse { ‘TDOK) // success!!! // dig.m_csaFoundFiles contains the files that matched our search criteria + else if (nResponse { 3 IDCANCEL) // operation failed or was cancelled History 20 Mar 2001 - udpated zip License This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below. A list of licenses authors might use can be found here Written By Chris | osinger Software Developer = United States Chris Losinger was the president of Smaller Animals Software, Inc. (which no longer exists). Comments and Discussions 229 messages have been posted for this article Visit https://www.codeproject.com/Articles/635/Easy-to-use-file-finding-dialog to post and view comments on this article, or click here to get a print view with messages. Permalink Article Copyright 2000 by ch" L®singer Advertise Everything else Copyright © Privacy CodeProject, 1999-2023 Cookies Terms of Use Web01 2.8:2022-12-16:1

You might also like