Click here to Skip to main content
15,892,298 members
Articles / Programming Languages / C++

Debug Toolkit

Rate me:
Please Sign up or sign in to vote.
4.20/5 (5 votes)
27 Mar 2000 180.5K   1.5K   88  
A complete debug toolkit to add intelligent debugging capability to your application.
//
// Please do not customise this code
//

// ProgressWnd.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CProgressWnd window

#define PW_SIZE_BORDER	8

#define PW_WIDTH_DEFAULT	(UINT)-1

// Bar styles.
#define PW_BARSTYLE_FIRST	0

#define PW_BARSTYLE_FLAT	0
#define PW_BARSTYLE_SUNKEN	1
#define PW_BARSTYLE_RAISED	2

#define PW_BARSTYLE_LAST	2

// Fill colour.
#define PW_FILLCOLOUR_DEFAULT	(COLORREF)-1

class CProgressWnd : public CFrameWnd
{

   CString	g_strCancel;
   CString	g_strProgress;

   // Construction
public:
	BOOL IsShowing(void);
	UINT GetCurrentPercentScale(void);
	void SetCancelText(CString strText);
	void SetFillColour(COLORREF dwColour);
	void SetWidth(UINT uWidth);
	void SetAnimationFile(CString strAVI);
	void SetBarStyle(UINT uStyle);
	void SetCancelMessage(UINT uMessage);
	BOOL WasCancelled(void);
	void SetCanCancelFlag(BOOL bCanCancel);
	void UpdateProgress(UINT uCount = 1);
	void ResetProgress(void);
	void SetFullScale(UINT uFullScale);
	void Hide(void);
	void Show(CWnd *pWndOwner = NULL);
	void SetMessage(CString strMessage, BOOL bResizeToFit = TRUE);
	void SetTitle(CString strTitle);
	CProgressWnd();

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CProgressWnd)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	protected:
	virtual void PostNcDestroy();
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CProgressWnd();

	// Generated message map functions
protected:
	//{{AFX_MSG(CProgressWnd)
	afx_msg void OnPaint();
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnDestroy();
	afx_msg void OnCancel(void);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	COLORREF m_dwFillColour;
	CAnimateCtrl * m_pAnimation;
	CString m_strAnimationAVI;
	CFont m_fntMessage;
	BOOL m_bWasCancelled;
	UINT m_uCancelMessage;
	CButton * m_pBtnCancel;
	BOOL m_bCanCancel;
	void ClearBar(void);
	UINT m_uLastPosition;
	void DrawBar(BOOL bForce = FALSE);
	UINT m_uBarStyle;
	UINT m_uCurrentValue;
	UINT m_uFullScale;
	CWnd * m_pWndOwner;
	HCURSOR m_hCur;
	CString m_strWndClass;
	CSize m_sizScreen;
	UINT m_uWidth;
	CRect m_rctMessage;
	CRect m_rctBar;
	void CalculateSizes(void);
	CString m_strMessage;
	CString m_strTitle;
};

/////////////////////////////////////////////////////////////////////////////

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

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


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions