Asp include file
Instant File Information
Windows users are now accustomed to the small text windows that pop up when
they place the mouse cursor over an object for a few seconds: the ubiquitous
ToolTips. All modern toolbars and user interface objects use ToolTips to give
the user instant feedback about what an object does or what it contains.
Strangely enough, this mechanism is used only sparingly by Windows Explorer.
Users see ToolTips only for file types recognized by Microsoft Office
applications like Word, Excel, or PowerPoint. For example, if you leave the
mouse cursor over a DOC file in Explorer, a ToolTip displays the author and
title of the document. This issue's utility, FileTip, provides this benefit for
other file types.
FileTip supports text files, executables, shortcuts, Zip files, bitmaps,
icons, animated cursors, AVI files, and HTML files. Different types of
information are provided for each file type. For example, the Zip file ToolTip
displays the file count and the names of the first five files in the archive,
and the shortcut ToolTip gives the path to which the shortcut points. To
distinguish ToolTips created by FileTip from other ToolTips, FileTip prefixes
the ToolTip text with the heading FileTip:. A configuration utility lets
you add extensions to different file types. Also, the utility's open
architecture enables developers to add new FileTip extension DLLs without
changing FileTip itself. Note that while you can distribute your DLLs, you
cannot distribute the FileTip utility. As per our license agreement, only
Ziff-Davis may distribute the utility itself.
FileTip runs under Microsoft Windows 95, Windows 98, and Windows NT 4.0, and
requires the Windows Desktop Update (WDU). It has also been tested with the
current beta version of Windows 2000. If you are running Windows 95 or Windows
NT 4.0, you may not have the WDU. The installation program will notify you if
this is the case. You can install the WDU by connecting to Microsoft's Windows
Update Web site and using Active Setup. Beware: If you have Internet Explorer
5.0 installed, you can't install the WDU without first switching back to
Internet Explorer 4.0. After installing the WDU, you can reinstall Internet
Explorer 5.0.
FileTip was written in Visual C++ with Active Template Library (ATL) and the
Microsoft Foundation Classes (MFC). Source code is provided with the utility for
those interested in seeing how the program works. The mechanism used by Explorer
to provide ToolTips for given file types is not documented, so you can learn a
lot by reading this article and looking at the source code.
Installing FileTip
To install FileTip, close all Explorer windows, run the supplied installation
program, and follow the instructions. If you are running Windows 95 or Windows
NT 4.0 and the WDU is not installed, the installation program will display a
warning message and suggest that you cancel the installation. Installing FileTip
when the WDU is not present is harmless; FileTip just won't work.
FileTip can be uninstalled from the Control Panel's Add/Remove
Programs dialog box. If you have connected nondefault filename extensions to
any of the provided FileTip extension DLLs (see below), the uninstall program
will ask whether you want to remove the information about these extra
connections from the Registry. In most cases, you'll answer Yes to this
prompt. Answering No will enable you to restore your current
configuration if you reinstall FileTip. You must make a backup copy of
Filetip.ini before clicking the No button. After reinstalling, just
replace the newly created FileTip.ini with your backup copy.
FileTip is an invisible Explorer add-in with no user interface. It's made up
of two main modules: FileTip.dll (the Explorer extension) and FTConf.exe (the
configuration program). FTConf can be run from the Start menu entry
created by the installation program. Each supported file type has an extension
DLL whose name has the form FTI_xxxx.dll. These files are installed in the
FileTip folder.
Getting Started
Once FileTip has been installed, ToolTips will pop up automatically whenever
you leave the mouse cursor over a filename with a supported file type. This
works in any type of Explorer window–single, pane, dual-pane, or even the
Windows desktop. You don't have to click on a filename to see the file tip, but
the Explorer window it's in must be active. If you want to see file tips on the
desktop, you may need to click on the desktop to make it active. Here is a
summary of the information displayed in the ToolTip for each supported file
type.
Executables include the following extensions by default: .dll, .drv,
.exe, .ocx, .scr, .sys, .vbx. The file tip gives the version number (both binary
and string version numbers), and the VERSIONINFO Comments field, if present (see
Figure 1). The support DLL is FTI_VerInfo.dll.
Text files include the following extensions by default : .bat, .btm,
.inf, .ini, .log, .reg, .txt. The file tip displays the first three lines of
text. The support DLL is FTI_TxtInfo.dll.
HTML files include the following extensions by default: .asp, .htm,
.html. The file tip displays the content of the <TITLE> tag. The support
DLL is FTI_HtmlInfo.dll.
Bitmap files have a file extension of .bmp. The file tip displays the
bitmap's size, number of planes, and number of colors used. The support DLL is
FTI_BmpInfo.dll.
Icon files have a file extension of .ico. The file tip displays the
number of icons in the file, and the size and number of colors for each icon.
The support DLL is FTI_IconInfo.dll.
Zip files have a file extension of .zip. The file tip displays the
number of files in the archive, the total expanded size of these files, and the
filenames of the first five files found in the archive (see Figure 2). The
support DLL is FTI_ZipInfo.dll.
Animated cursors have a file extension of .ani. The file tip displays
the number of frames and the number of steps in the cursor. The support DLL is
FTI_AniInfo.dll.
AVI files have a file extension of .avi. The file tip displays the
number of frames, number of streams, and the file size. The support DLL is
FTI_AviInfo.dll.
Shortcut files have a file extension of .lnk. The file tip displays
the target filename and shortcut descriptor, if one exists (see Figure 3). The
support DLL is FTI_LnkInfo.dll.
Configuring FileTip
Most users will never need to make any changes to their FileTip
configuration. The configuration utility, FTConf, serves two purposes: It lets
you add extensions to supported file types, and it lets developers add new file
types by connecting their extension DLLs to FileTip. The only file type for
which users may want to add extensions is the Text file type. For
example, you may want to add the .prn extension.
The main window of FTConf displays a list of the file extensions currently
recognized by FileTip (see Figure 4). When you select an extension in this list
box, the file extension, DLL name, and file tip
text are displayed in the File type information group box in the
upper-right corner of the window.
To associate a new file extension with a supported file type, enter the
extension DLL for that file type, type in the new extension, and click the
Add/Modify button. You can locate the correct extension DLL by using the
browse button next to the DLL name field or by selecting an extension that is
already associated with that extension DLL. To remove FileTip support for a
given extension, select the extension in the File extensions list and
click the Remove button. In both cases, nothing is actually changed until
you click the OK button. Click Cancel to keep your current
configuration.
If you want to undo your changes and revert back to the default FileTip
configuration, you can use the Restore defaults button. Checking the
Keep new extensions option will cause FTConf to restore the settings for
the default file types, but will leave your own additions unchanged. If this box
is unchecked, all modifications will be cleared and the configuration will
revert back to the configuration created during installation.
If you are a programmer and have developed a FileTip extension DLL for a new
file type, you can install the new DLL by placing it in the FileTips folder and
using FTConf to associate file extensions with the DLL. If you store the DLL in
a different folder, you must give the full pathname. When you click the
Add/Modify button, FTConf checks whether the specified DLL is a valid
FileTip extension DLL. It also checks the copyright notice. If the selected DLL
was not developed by PC Magazine, a notification is displayed below the
DLL name.