/***********************************************************************/ /* Copyright (C) 2002 Definitive Solutions, Inc. All Rights Reserved. */ /* THIS COMPUTER PROGRAM IS PROPRIETARY AND CONFIDENTIAL TO DEFINITIVE */ /* SOLUTIONS, INC. AND ITS LICENSORS AND CONTAINS TRADE SECRETS OF */ /* DEFINITIVE SOLUTIONS, INC. THAT ARE PROVIDED PURSUANT TO A WRITTEN */ /* AGREEMENT CONTAINING RESTRICTIONS ON USE AND DISCLOSURE. ANY USE, */ /* REPRODUCTION, OR TRANSFER EXCEPT AS PROVIDED IN SUCH AGREEMENT */ /* IS STRICTLY PROHIBITED. */ /***********************************************************************/ #if !defined(MYPROGRESSCTRLH_C3B8BF81_2A32_11d6_8AC9_00B0D0529ED2_INCLUDED_) #define MYPROGRESSCTRLH_C3B8BF81_2A32_11d6_8AC9_00B0D0529ED2_INCLUDED_ #pragma once ///////////////////////////////////////////////////////////////////////////// // MyProgressCtrl // Declare the class depending on this file is in an EXE project or a DLL one. class #ifdef _WINDLL AFX_EXT_CLASS #endif MyProgressCtrl : public CProgressCtrl { // Construction. public: MyProgressCtrl(bool bRandomizeColors = false); virtual ~MyProgressCtrl(); // Overrides. public: virtual void SetRange(int nLower, int nUpper); virtual int SetStep(int nStep); virtual int SetPos(int nPos, bool bInvalidate = true); virtual int SetPos(double dPos, bool bInvalidate = true); virtual int StepIt(bool bInvalidate = true); // Operations. public: // Set Functions. void SetTextColor(COLORREF cr) { m_crText = cr; } void SetBkColor(COLORREF cr) { m_crBkGround = cr; } void SetBegColor(COLORREF cr) { m_crBeg = cr; } void SetEndColor(COLORREF cr) { m_crEnd = cr; } void ShowMessage(bool b = true) { m_bShowMessage = b; } void RandomizeColors(); void SetEtaStart(); // Get Functions. int GetPos() const { return m_nCurrentPosition; } COLORREF GetTextColor() const { return m_crText; } COLORREF GetBkColor() const { return m_crBkGround; } COLORREF GetBegColor() const { return m_crBeg; } COLORREF GetEndColor() const { return m_crEnd; } //{{AFX_VIRTUAL(MyProgressCtrl) //}}AFX_VIRTUAL // Generated message map functions. protected: void DrawGradient(CPaintDC& dc, const CRect& rcClient, int nMaxWidth); void DrawMessage(CDC& dc, CRect& rcClient); //{{AFX_MSG(MyProgressCtrl) afx_msg void OnPaint(); afx_msg BOOL OnEraseBkgnd(CDC* pDC); //}}AFX_MSG DECLARE_MESSAGE_MAP() // Data. private: int m_nLower; int m_nUpper; int m_nStep; int m_nCurrentPosition; COLORREF m_crBeg; COLORREF m_crEnd; COLORREF m_crBkGround; COLORREF m_crText; bool m_bShowMessage; CFont* m_pfntText; CString m_sText; DWORD m_dwTickStart; double m_dPercentLast; bool m_bSetEtaStartCalled; }; //{{AFX_INSERT_LOCATION}} // Microsoft Developer Studio will insert additional declarations immediately before the previous line. #endif // !defined(MYPROGRESSCTRLH_C3B8BF81_2A32_11d6_8AC9_00B0D0529ED2_INCLUDED_)