only for RuBoard - do not distribute or recompile |
Property sheet handlers are required to implement two interfaces: IShellExtInit and IShellPropSheetExt . You are already familiar with IShellExtInit (see Chapter 4). IShellPropSheetExt contains only two methods : AddPages , which is called to add a page to a property dialog, and ReplacePage , which, as you might guess, replaces an existing property page. A property sheet handler implements AddPages only. ReplacePage is not implemented, since it applies only to Control Panel objects.
When the Properties menu item is selected for a file object, Explorer initializes the handler by calling IShellExtInit::Initialize . The selected file is passed to the handler via an IDataObject interface. Typically, the property sheet handler would save the name of the file in a private member variable for later use.
Then the shell calls IShellPropSheetExt::AddPages . The implementor of AddPages is required to fill out a PROPSHEETPAGE structure that contains information about the new property page. The structure is then passed to the CreatePropertySheetPage API, and a handle to the newly created property page is returned if the call was successful.
One of the parameters passed in by the shell to AddPages is a function address. The function specified by this address must then be called with the handle to the newly created page as its only parameter. If you are confused , don't worry. We'll go over this in detail when we implement IShellPropSheetExt .
only for RuBoard - do not distribute or recompile |