Painting a Progress Bar
- From: "jp2code" <poojo.com/mail>
- Date: Tue, 12 Jun 2007 10:27:21 -0500
I've got an eVC4 application that downloads files.
Informational messages are displayed to the User as text on the main form
using OnPaint()'s CPaintDC::DrawText. This works great. I can display the
User's last instruction just below the selection bar on the application's
"rectangle," display progress or notes by using DT_CENTER, or display the
information in status bar fashion using DT_BOTTOM. This seems to work better
than using static text controls that I have to hide/show or send to the
back/front whenever they are needed.
Now, I'd like to include a progress bar. The list of controls available for
forms in eVC4 does include a Progress control, but I would like to be able
to draw one on the screen similar to the way I send text to the screen.
Any thoughts or suggestions on how to do this?
Preliminary idea: Create a transparent (or gray) rectangle with a black
border based on a percentage of the available width, then (somehow) fill a
percentage of the rectangle with yellow (my progress bar color). Finally,
position it!
How would I fill a portion of the rectangle (i.e. How would I fill 1/10th or
3/10ths, starting on the leftmost edge)?
Is this a bad idea? Would it be too much work for the Pocket PC device, or
would it be about the same amount of work done by a Progress control?
Thanks for the help!
Joe
.
- Follow-Ups:
- Re: Painting a Progress Bar
- From: Uncle Marvo
- Re: Painting a Progress Bar
- Prev by Date: Re: eMbedded VIsual Basic Runtime Error
- Next by Date: RE: CreateProcess
- Previous by thread: Re: eMbedded VIsual Basic Runtime Error
- Next by thread: Re: Painting a Progress Bar
- Index(es):
Relevant Pages
|