Customize an Iconic Thumbnail and a Live Preview Bitmap

This topic contains the following sections:


This sample shows how to customize an iconic thumbnail and a live preview (or Peek preview) bitmap by using functions and messages that are introduced in the Windows 7 Desktop Window Manager (DWM) APIs. Specifically, this sample uses the DwmSetIconicThumbnail function and the WM_SENDICONICTHUMBNAILBITMAP message to customize an iconic thumbnail. It also uses the DwmSetIconicLivePreviewBitmap function and the WM_SENDICONICLIVEPREVIEWBITMAP message to set an iconic live preview bitmap.

The following illustration shows a default thumbnail transformed into a customized thumbnail.

illustration of an original thumbnail image and a modified thumbnail image with a custom bitmap


Minimum supported client Windows 7 or Windows Vista with Service Pack 2 (SP2) and Platform Update for Windows Vista
Minimum supported server Windows Server 2008 R2 or Windows Server 2008 with Service Pack 2 (SP2) and Platform Update for Windows Server 2008
Windows SDK Windows Software Development Kit (SDK) for Windows 7


Downloading the Sample

This sample is available in the following locations.

Location Path/URL
Code Gallery Download from MSDN Code Gallery


Building the Sample

To build the sample by using the command prompt

  1. Open a Command Prompt window and browse to the sample directory.
  2. Enter msbuild IconicThumbnail.sln.

To build the sample by using Microsoft Visual Studio 2008 (preferred method)

  1. Open Windows Explorer and browse to the folder where the IconicThumbnail.sln file is located.
  2. Double-click the solution file (.sln) to open the file in Microsoft Visual Studio.
  3. On the Build menu, click Build Solution. The application is built in the default \Debug or \Release directory.

Desktop Window Manager

Windows Development