Share via


Registering Your Property Sheet Handler

banner art

Previous Next

Registering Your Property Sheet Handler

In order for your property sheet handler to be recognized by the WPD namespace you must register it properly in the Windows registry. The registration entries for a WPD property sheet handler are similar to those for the shell, but they are registered as special file types. WPD property sheet handlers are registered according to the content type they represent. Below is a sample registration tree for a WPD context menu handler:

  HKEY_CLASSES_ROOT
 \-- WPDPropSheet.Image
      \-- shellex
           \-- PropertySheetHandlers
                \-- MyHandler (Default)  REG_SZ {0000000-0000-0000-0000-000000000000}

The above example registers a custom handler with the WPD namespace. When a user right-clicks an image file on a device through the Windows Shell and selects Properties, it invokes this property sheet handler. The WPD namespace uses the WPD_CONTENT_TYPE to determine which property sheet handlers to load. If the content type does not provide a useful classification, then the namespace will load the property sheet handlers under the WPDPropSheet.Generic registry key. The following table lists all of the file classes available to a context menu handler and what content types and file extensions they represent.

Registry Key WPD Content Type
WPDContextMenu.Device Registering under this key enables your context menu handler at the device level. (Right-click on a device.)
WPDContextMenu.Storage Registering under this key enables your context menu handler at the storage level. (Right-click on a storage.)
WPDContextMenu.Folder WPD_CONTENT_TYPE_FOLDER
WPDContextMenu.Image WPD_CONTENT_TYPE_IMAGE
WPDContextMenu.Audio WPD_CONTENT_TYPE_AUDIO
WPDContextMenu.Video WPD_CONTENT_TYPE_VIDEO
WPDContextMenu.Playlist WPD_CONTENT_TYPE_PLAYLIST
WPDContextMenu.Document WPD_CONTENT_TYPE_DOCUMENT
WPDContextMenu.Contact WPD_CONTENT_TYPE_CONTACT
WPDContextMenu.Email WPD_CONTENT_TYPE_EMAIL
WPDContextMenu.Appointment WPD_CONTENT_TYPE_APPOINTMENT
WPDContextMenu.Task WPD_CONTENT_TYPE_TASK
WPDContextMenu.Memo WPD_CONTENT_TYPE_MEMO
WPDContextMenu.ImageAlbum WPD_CONTENT_TYPE_IMAGE_ALBUM
WPDContextMenu.AudioAlbum WPD_CONTENT_TYPE_AUDIO_ALBUM
WPDContextMenu.VideoAlbum WPD_CONTENT_TYPE_VIDEO_ALBUM
WPDContextMenu.MixedAlbum WPD_CONTENT_TYPE_MIXED_CONTENT_ALBUM
WPDContextMenu.Generic WPD_CONTENT_TYPE_UNSPECIFIED

WPD_CONTENT_TYPE_GENERIC_FILE

WPD_CONTENT_TYPE_PROGRAM

Previous Next