1<html><head> 2 <title>Metakit CatFish Sample</title> 3</head><body bgcolor=white> 4 5<font face=Helvetica size=3> 6 7<!--begin--> 8<h2><img src="e4app.gif" alt="App Icon" border=0 align=left> 9Metakit sample code - CatFish</h2><br clear=left> 10 11<p>CatFish is the flagship of these sample applications. It is a very fast 12disk catalog browser which can easily deal with the huge file collections 13often found on current hard disks and CD-ROM software collections. </p> 14 15<p><b>What it does</b>: CatFish allows you to create disk catalogs by scanning 16disks, either entirely or from a specified directory, and to browse through 17the directories in each catalog to list the files, their sizes, and their 18modification dates. In addition, CatFish displays statistics about each 19directory, such as the total number of sub-directories, files, and kilobytes 20in each (including all nested entries). It also tells you the date of the 21most recent file in each directory (even if that file is inside a sub-directory). 22There is a flexible search facility to find files by (partial) name, size, 23and/or date. Finally, CatFish can be used as an application/document launcher 24- a bit like the File Manager (or the Explorer in Windows 95). </p> 25 26<p>The data files used by CatFish use the same format as those created 27by DisCat and FtpCat. You can use FtpCat to create FTP server catalogs 28- and then use CatFish to browse through them. </p> 29 30<p><b>What it illustrates</b>: CatFish is a 16-bit Windows application 31(it runs on Windows 95, and probably Windows NT, as well). The freeware 32version has been built with the static library version of Metakit and is 33fully self-contained. The size of the executable file illustrates how small 34complete applications can be when using Metakit for persistent storage. 35The makefile included with the sources are configured for dynamic linkage, 36which will produce an even smaller executable. </p> 37 38<p>CatFish uses a carefully chosen data structure with a high "locality 39of reference", which generates very compact catalog files and which 40makes browsing extremely fast - even for full CD-ROM catalogs and large 41FTP archive server catalogs (created with FtpCat). </p> 42 43<p>There are several goodies in this sample application. Among other things, 44CatFish demonstrates: </p> 45 46<ul> 47 <li>How to use a sorted view subset (selection) of Metakit in a CListBox (MFC) </li> 48 <li>How to implement customizable sort order for a listbox, with clickable headers</li> 49 <li>How to scan directories recursively - in Win16 / Win32 / Win95 (long filenames) </li> 50 <li>How to quickly display huge lists - using the owner-draw listbox control </li> 51 <li>How to simplify columnar list formatting - using the MS Sans Serif font </li> 52 <li>How to implement the ellipsis (...) for text strings which are too long to show </li> 53 <li>How to deal with international dates, times, and numbers - but only a little bit </li> 54 <li>How to launch applications and/or documents - using ShellExecute()</li> 55 <li>How to make a modal dialog main window deal with menus and accelerators</li> 56</ul> 57 58<p><b>How to use it</b>: This sample application is also separately distributed 59as freeware, and includes more of the standard features you would expect 60than the other sample applications in this library. Using CatFish is simple: 61set up one or more catalog files (which will be stored in the same directory 62as the executable) and start browsing by clicking on the various lists 63in the main window. To descend into a subdirectory, double-click on its 64name. To go back, double-click on one of the parent directory names. </p> 65 66<p>To search for a file, you can use the Edit / Find menu entry or use 67keyboard shortcuts, such as CTRL+F (find), F3 (find next), SHIFT+F3 (find 68previous).</p> 69 70<p>If you want to use FtpCat in combination with CatFish, make sure that 71you give all catalog files the extension ".cf4" and that you 72place them in the same directory as the CatFish utility itself. That's 73all. </p> 74 75<p><b>Known problems</b>: None.</p> 76 77<p><b>Files in EXAMPLES\CATFISH</b>: </p> 78 79<p>CATFISH.H, CATFISH.CPP - Main MFC application code 80<br>CATFISH.MAK - MSVC 1.52 project makefile for Win16 81<br>CATFISH.DEF, CATFISH.RC - Linker definitions, Application resources 82 83<br>PICKDIR.H, PICKDIR.CPP - Directory picker 84<br>RESOURCE.H - Resource symbol definitions 85<br>SCANDISK.H, SCANDISK.CPP - Creates a disk catalog object using Metakit 86 87<br>SETUPDLG.H, SETUPDLG.CPP - Setup dialog 88<br>STDAFX.H, STDAFX.CPP - Used for precompiled headers 89<br>RES\*.* - Application resources </p> 90<!--end--> 91 92<center><p><hr size=1> 93|| 94 <a href="index.html" target="_top">Roadmap</a> 95 <a href="classes.html">Class Index</a> 96 <a href="samples.html">Sample Index</a> 97 || 98 <a href="intro.html">Introduction</a> 99 <a href="tips.html">Tips and Tricks</a> 100 || 101 102</center> 103</font> 104 105</body></html> 106