Windows 7 Goodies in C++: Taskbar Progress and Status Indicators
An intro to using Taskbar progress bars and overlay icons with your Windows 7 applications
Introduction
One of the major changes to how the Windows 7 Taskbar operates is in an area that Microsoft calls peripheral status. This covers two types of status indicators: progress for long operations, and icons for important notifications. Apps can continue to use progress dialogs during long operations, but the Windows 7 Taskbar lets the app show a progress bar in its Taskbar button as well, so the user can see the progress indicator at a glance, without having to switch to the app.
Many apps also use the notification area to convey important status information. For example, Outlook shows an icon when you have new email. However, in Windows 7, notification area icons are hidden by default, so the notification area is no longer useful for displaying this kind of status. The Taskbar lets an app display a 16×16 icon that is overlaid on the existing icon in its Taskbar button. This prevents the notification area from getting too crowded, and keeps the status icon visually associated with the app that created it.
This article’s sample app is a re-write of the file downloader from my article Using Internet Explorer to download files for you. The app shows the download progress in its Taskbar button, in addition to a traditional progress bar in the dialog. This app didn’t have a notification area icon before, but for the purposes of demonstrating the API calls involved, it has commands for showing a status icon as well.
The sample code for this article was built with Visual Studio 2008, WTL 8.0, and the Windows 7 RC SDK.