Painting a Progress Bar

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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


.



Relevant Pages

  • [PATCH 15/19] TuxOnIce: Userspace user interface support.
    ... +static int userui_storage_needed ... * Side effect routine for when the userui program is set. ... * @value: Current progress percentage numerator. ... Whether to pause or just display the message. ...
    (Linux-Kernel)
  • Re: Text overlay on image then Save to JPEG with reasonable DPI for Online printshop
    ... it actually measures 14 x 9 centimetres when the user holds a ruler up ... whatever) and place a rectangle on the displayed page. ... when talking about the monitor display this statement of yours about ... machines a "14 x 9 logical centimetre" rectangle will occupy almost all of ...
    (comp.lang.basic.visual.misc)
  • newbie and DrawImage
    ... My application has a form which should display an image at an arbitrary zoom ... and optionally draw other images onto the ... // calculate the destination rectangle scaled according to _fScale ... creates display errors on the sides opposite to the direction of scrolling. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Update value of VBA variable on a form in text box
    ... Public Function GetStartTimer() As Single ... Public Function ScreenUpdate() ... ' Each rectangle will turn Green in sequence ... 'For now I would like to be able to display the "Start" variable ...
    (microsoft.public.access.queries)
  • Re: No fill colors on screen, but prints ok
    ... I create a rectangle using the rectangle tool and ... >>View, pictures, click detail display... ... >>Mary Sauer MS MVP ...
    (microsoft.public.publisher)