Click here to Skip to main content
Licence 
First Posted 14 Oct 2005
Views 125,168
Downloads 1,926
Bookmarked 86 times

Taskbar Progressbar Control

By | 3 Apr 2007 | Article
How to put a progressbar control into the taskbar.

Introduction

This article describes how to put a progress bar control into the taskbar.

Sample screenshot

Sample screenshot

How does it work?

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 HWnds. 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.

Facts

  • The progress control is directly attached into the taskbar. When you have enabled the Auto Hide option of the Windows Taskbar, the control moves with it.
  • We need to renew the control when we:
    • add an icon into the tray notify bar.
    • change/move the taskbar from horizontal to vertical and vice versa.
    • * etc..
  • To renew the control, we need a timer at this time (I haven't found a kind of broadcast message yet).
  • Parent window of the control is the Shell_TrayWnd of the Taskbar.

Other classes used

  • CTextProgressCtrl by Chris Maunder.

Where does it work?

It's tested on:

  • WinXP
  • Win2000 Prof.
  • Win2003 Server

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.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Nautilus Master



Austria Austria

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionControl is transparent in Vista. How to make it non transparent? Pinmemberdima polyakov14:48 5 May '07  
AnswerRe: Control is transparent in Vista. How to make it non transparent? Pinmemberdima polyakov7:48 6 May '07  
Generaldisplay progress bar Pinmemberanu jaggi23:21 24 Apr '07  
GeneralUPDATE: TTaskbarContainer [modified] PinmemberNautilus Master9:03 31 Mar '07  
GeneralBug in NProgressBar.cpp with m_bCreated PinmemberPort23323:24 27 Feb '07  
GeneralRe: Bug in NProgressBar.cpp with m_bCreated PinmemberNautilus Master7:25 27 Feb '07  
Generalneed a C# version Pinmembergoldli15:16 24 Feb '07  
GeneralRe: need a C# version PinmemberNautilus Master7:43 2 Mar '07  
GeneralRe: need a C# version Pinmemberquin5820:13 15 Mar '10  
Generalseparate TaskBarHandling & ProgressCtrl PinmemberJimmyO14:01 17 Jan '07  
GeneralVersion 1.0.2 well uploaded [modified] PinmemberNautilus Master9:02 24 Jul '06  
GeneralRe: Version 1.0.2 well uploaded PinmemberDefenestration11:25 24 Jul '06  
QuestionNeed Soucre in VB net 2003 Pinmemberjur1sa16:50 21 Jul '06  
AnswerRe: Need Soucre in VB net 2003 PinmemberNautilus Master7:30 24 Jul '06  
GeneralProblem with double line TaskBar Pinmemberzerolan221:19 20 Jul '06  
GeneralRe: Problem with double line TaskBar [modified] PinmemberNautilus Master6:54 21 Jul '06  
GeneralRe: Problem with double line TaskBar Pinmemberzerolan221:51 24 Jul '06  
Generalwell done PinmemberNautilus Master9:04 24 Jul '06  
GeneralRe: well done Pinmemberzerolan225:27 25 Jul '06  
GeneralThe application doesn't run correctly on windows2000 server PinmemberGavin Yuan20:46 13 Feb '06  
GeneralRe: The application doesn't run correctly on windows2000 server PinmemberNautilus Master23:39 27 Feb '06  
Generaladd exe demo :-) Pinmemberam0n_66622:45 29 Oct '05  
GeneralNeeds to be reworked and optimized further. PinmemberWREY19:26 29 Oct '05  
GeneralRe: Needs to be reworked and optimized further. PinmemberNautilus Master1:51 30 Oct '05  
GeneralUpdate v.1.0.1 PinmemberNautilus Master6:32 28 Oct '05  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web02 | 2.5.120517.1 | Last Updated 3 Apr 2007
Article Copyright 2005 by Nautilus Master
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid