Редактиране

Споделяне чрез


Customize an Iconic Thumbnail and a Live Preview Bitmap

Description

You can 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, you use the DwmSetIconicThumbnail function and the WM_SENDICONICTHUMBNAILBITMAP message to customize an iconic thumbnail. You can also use the DwmSetIconicLivePreviewBitmap function and the WM_SENDICONICLIVEPREVIEWBITMAP message to set an iconic live preview bitmap.

For a sample application that uses the DwmSetIconicThumbnail function, see TabThumbnails sample.

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

Requirements

Requirement Value
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
Minimum Windows SDK Windows Software Development Kit (SDK) for Windows 7

Building the TabThumbnails sample

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

  1. Open Windows Explorer and browse to the folder where the TabThumbnails.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.

To build the sample by using the command prompt

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

Desktop Window Manager

Windows Development