Click here to Skip to main content
Click here to Skip to main content

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 -->

    Introduction

    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.

    License

    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

    Share

    About the Author

    NormDroid
    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
    • ASP.net
     
    Visit Software Kinetics
    Follow on   Twitter

    Comments and Discussions

     
    Generaltake a look @ this PinmembereRRaTuM10-Jun-05 0:36 
    GeneralRe: take a look @ this Pinmembernorm.net10-Jun-05 0:47 
    Generalexe problem Pinmembersalah_gis18-Dec-02 1:28 
    GeneralDll question Pinmembersalah_gis18-Dec-02 1:26 
    Generallets add more to it Pinmemberaeropriest9-Apr-02 9:19 
    GeneralRe: lets add more to it PinmemberNorm Almond9-Apr-02 23:31 
    GeneralRe: lets add more to it Pinmemberaeropriest10-Apr-02 0:06 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

    | Advertise | Privacy | Terms of Use | Mobile
    Web03 | 2.8.141216.1 | Last Updated 23 Aug 2000
    Article Copyright 2000 by NormDroid
    Everything else Copyright © CodeProject, 1999-2014
    Layout: fixed | fluid