Share via


Exercise 2: Supporting Taskbar Thumbnails

MFC has added support for Taskbar Thumbnails in Visual Studio 2010. The support built into MFC applications is based on the tabbed Multiple Document Interface (MDI).

Note:
In MFC, the support for Taskbar thumbnail previews is built in, so the Taskbar thumbnails will show any rendering within the views. Therefore, other than implementing your own View drawing, you need not provide any explicit code to update those Thumbnails.

Task 1—Supporting Taskbar Thumbnails

To enable Taskbar Thumbnails in an MFC application while using the MFC application wizard, all the user needs to do is select the “Multiple documents” application type with the option “Tabbed documents” enabled (see Figure 8). When the application runs, MFC will take a snapshot of each view and send it to the Taskbar APIs to display as thumbnails.

Figure 8

MFC Application Wizard - Application Type

In Visual Studio 2010, open the TaskbarThumbnails_Solution\TaskbarthumbnailsDemo.sln solution (under the Source folder).

Build and Run the application.

Open a few .jpeg image files using the application.

Hover over the application Demo button on the taskbar. You should see an output similar to Figure 9 below.

Figure 9

Taskbar Thumbnails for MDI applications