Hello everybody,

Did anybody ever put a progress bar in a status bar window. If yes some links or ideas would be appreciated. I been trying to do this for a while without any luck.

best regards,

Posted on 2001-12-24 13:26:20 by czDrillard
I don't know how to put a progress bar *control* inside a status bar, but with the SB_SETTEXT message and the SBT_OWNERDRAW flag, you can owner-draw each part. Then just draw a rectangle of the right size that represents the progress bar, or blocks if you want.

Posted on 2001-12-24 13:45:01 by Thomas
I've written a little example of what I mean. The source is a bit messy because it was written in a hurry and the progress bar flickers sometimes but you can solve that with a backbuffer.

Posted on 2001-12-24 14:11:28 by Thomas
Thanks Thomas,

Very complete answer and your attachment works good. That little bit of flicker doesn't matter.

I was going to use this when I enumerate files. Instead of the listview stay blank for a few seconds then fill with data I thought it would be cool to show progress bar while waiting. The problem is there is no simple way to make this meaningful without knowing the number of files ahead of time. and I don't know the number until after they enumerated. Too bad :(

If anybody has any ideas on this I'd like to hear them.

best regards,

Posted on 2001-12-27 00:59:56 by czDrillard
Hmm it will be very hard to give a meaningfull progress indication... maybe you can just use it as decoration, a 'wait, I'm busy'-indicator :grin:

Posted on 2001-12-27 11:11:29 by Thomas
I never knew about that with the status bar... :) Hmmm, Neat trick Thomas...

Posted on 2001-12-28 00:30:12 by NaN