分类: C/C++
2007-04-26 14:52:50
This article describes how to put a progress bar control into the taskbar.
First, we need to create an instance of the progress control. The progress bar control will be automatically attached to the taskbar. At startup, the program searches for three specific HWnd
s. These are Shell_TrayWnd
, ReBarWindow32
and TrayNotifyWnd
. The program tasks, shortcut bar etc.. are all included into this window using the ReBarWindow32
class. ReBarWindow32
is directly placed beside the TrayNotifyWnd
window. All we need to do now is to create the progress bar using the method Create
but we don't add it to our main window, we add it to the taskbar. An important fact is, that the control needs its own message map, else you will get a 100% CPU usage due to the message handling when we click on the control in the taskbar.
Shell_TrayWnd
of the Taskbar. CTextProgressCtrl
by Chris Maunder.It's tested on:
Use this program / source code at your own risk. The author of this program is not responsible for any damage on your or another computer caused by this program.