Chapter 6. Property Sheet Handlers

A standard set of properties is available for every file object via the Properties context menu or by selecting File Properties from Explorer’s main menu. These properties include things like file attributes, size, location, date created, and so on. The information is made available in a tabbed dialog, as shown in Figure 6.1, providing the user with an opportunity to change a file’s attributes (in the most generic implementation). Property sheet handlers permit additional pages to be added to this dialog, allowing the possibility of additional file processing.

Microsoft Word is a good example of this functionality in action, as it adds four additional property pages to the standard dialog for its .doc file type. These additional property pages allow users to modify .doc file attributes like title, author, and subject of a document without having to start Microsoft Word. Figure 6.2, for instance, shows the Summary property sheet of a Microsoft Word .doc file, an interface element added by Word’s property sheet handler.

Property page dialog

Figure 6-1. Property page dialog

Word Summary property sheet

Figure 6-2. Word Summary property sheet

How Property Sheet Handlers Work

Property sheet handlers are required to implement two interfaces: IShellExtInit and IShellPropSheetExt. You are already familiar ...

Get VB Shell Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.