Click here to Skip to main content
13,300,002 members (62,559 online)
Click here to Skip to main content
Add your own
alternative version


17 bookmarked
Posted 22 Aug 2000

Pie Progress Control

, 22 Aug 2000
Rate this:
Please Sign up or sign in to vote.
A progress control with a difference
<!-- Download Links -->
  • Download source files - 4 Kb
  • Download demo project - 32 Kb
  • <!-- Article image -->

    Sample Image - piectrl.jpg

    <!-- Main HTML starts here -->


    This article shows the use of a pie progress control. The code is encapsulated in a MFC class. The class itself is derived from a CStatic class. The code demonstrates the how perform flicker free drawing. The control works in a similar way to the standard Windows progress control.

    The main core of the code is in the drawing routine (OnPaint).

    The public interface to access the class is shown here...

    void SetTextColor(COLORREF crColor);
    void SetBkColor(COLORREF crColor);
    void SetPieOutlineColor(COLORREF crColor);
    void ShowText(BOOL bText);
    void SetStep(int nStep);
    void GetRange(int& nLower, int& nUpper);
    void SetRange(int nLower, int nUpper);
    void PieOutlineColorEnable(BOOL bState);
    int StepIt();
    int OffsetPos(int nOffset);
    int GetPos();
    int SetPos(int nPos);

    The class is created with the window default Create() member. The control can be any shape or size. The example code also shows how to add a client edge to the window.

    The next version will allow:

    • Text orientation and sizing.
    • Gradient coloring.
    • Optional background bitmap.
    • Jaggies removed.


    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

    Software Developer (Senior) Software Kinetics
    United Kingdom United Kingdom

    Software Kinetics
    are experts in developing customised and bespoke applications and have expertise in the development of desktop, mobile and internet applications on Windows.

    We specialise in:

    • User Interface Design
    • Desktop Development
    • Windows Phone Development
    • Windows Presentation Framework
    • Windows Forms
    • Windows Communication Framework
    • Windows Services
    • Network Applications
    • Database Applications
    • Web Development
    • Web Services
    • Silverlight

    Visit Software Kinetics

    You may also be interested in...


    Comments and Discussions

    Generaltake a look @ this Pin
    eRRaTuM10-Jun-05 0:36
    membereRRaTuM10-Jun-05 0:36 
    GeneralRe: take a look @ this Pin
    norm.net10-Jun-05 0:47
    membernorm.net10-Jun-05 0:47 
    Generalexe problem Pin
    salah_gis18-Dec-02 1:28
    membersalah_gis18-Dec-02 1:28 
    GeneralDll question Pin
    salah_gis18-Dec-02 1:26
    membersalah_gis18-Dec-02 1:26 
    Generallets add more to it Pin
    aeropriest9-Apr-02 9:19
    memberaeropriest9-Apr-02 9:19 
    GeneralRe: lets add more to it Pin
    Norm Almond9-Apr-02 23:31
    memberNorm Almond9-Apr-02 23:31 
    GeneralRe: lets add more to it Pin
    aeropriest10-Apr-02 0:06
    memberaeropriest10-Apr-02 0:06 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    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 | Terms of Use | Mobile
    Web02 | 2.8.171207.1 | Last Updated 23 Aug 2000
    Article Copyright 2000 by NormDroid
    Everything else Copyright © CodeProject, 1999-2017
    Layout: fixed | fluid