★ wanayoo — archive 1999 http://codeguru.developer.com/controls/MacProgress.shtmlNouvelle recherche | Portail wanayoo
EarthWeb
Developer.com Click Here!
Click Here!
Find:
 

EXPERT SEARCH
-----
Site
windows 2000
visual c++
java
visual basic
javascripts
recommend it
 
Contest
mfc codeguru
submission guidelines
 
Book
thinking in c++
stl programmer's guide
reviews
 
Interact
forums
newsgroups
guest book
jobs
jokes
open faq
what's new
 
Other
about
links
newsletters
privacy
tools
 

-----
Visual C++ by E-mail:

Get the weekly e-mail highlights on
Visual C++!
-----



EarthWeb Sites:
CROSSNODES
DATAMATION
DEVELOPER.COM
DICE
DISCUSSIONS
EARTHWEB.COM
EARTHWEB DIRECT
EARTHWEB EVENTS
ERP HUB
GAMELAN
GOCERTIFY
HTML GOODIES
INTRANET JOURNAL
ITKNOWLEDGE
IT NEWS
JARS
JAVASCRIPTS.COM
OPEN SOURCE IT
PERL JOURNAL
SYSOPT.COM
SUPPORTSOURCE
TECHCRAWLER
Y2KINFO

EarthWeb Worldwide

   

Macintosh-like Progress Control


This article was contributed by Paul M. Meidinger.

Environment: Windows NT4 SP4, Visual C++ 6

This image shows an example of my CMacProgressCtrl and CMacSliderCtrl. For more information on the CMacSliderCtrl, please refer to this article.

This class is my attempt at recreating the progress control of the Macintosh. This control (CMacProgressCtrl) allows you to change its colors as well as set an "indeterminate state" (similar to the "barber pole" look of progress controls on the Mac). This state can be used to indicate to the user that the length of time to finish the current operation is unknown.

Public Member Functions


void SetColor(COLORREF crColor)
COLORREF GetColor()
void SetIndeterminate(BOOL bIndeterminate = TRUE)
BOOL GetIndeterminate()

Steps to add a CMacProgressCtrl to a dialog

  • Add the desired files to your project.
  • Add the #include directive to the header file of your dialog class.
  • Add a progress control to your dialog in the resource editor.
  • Use ClassWizard to add a member variable of type CMacProgressCtrl for the corresponding controls you just added. If the CMacProgressCtrl classe is not in the Variable Type list, choose CProgressCtrl, and manually change the types in the header file of your dialog class.
  • Downloads

    Special Note: The demo and source files are the sames available in the CMacSliderCtrl article.
    Download demo project - 35 Kb
    Download source - 11 Kb

    History

    Date Posted: January 11, 2000

    Comments:

    Add Comment

       

    Give them a visit Click Here!

    Click Here!

    INSTANT EXPERTS!
    Savvy IT Pros report on SupportSource. Take a look inside the largest vault of multi-vendor computing specs ever assembled. Click here for an In-depth Report,.

    Learn about Free & Open Source software at the Bazaar Conference & Expo!,
    December 14-16, 1999 in New York City! Click here for more information.

    For tons of Windows technology resources, check out the Windows Programming directory.

    Go to Fatbrain for the NEWEST and BEST technical books for IT professionals.

    Get Linux Utilities for ONLY $34.95 at EarthWeb Direct.

    Give them a visit Click Here!

    Click Here!

    Click Here!

    Click Here!

    Home About Us Search Subscribe Advertising Info Contact Us FAQs
    Use of this site is subject to certain Terms & Conditions.
    Earthweb's statement regarding our users' right to privacy.
    Copyright ©1996-2000 EarthWeb Inc.. All rights reserved. Reproduction in whole or in part in any form or medium without express written permission of EarthWeb is prohibited.