Click here to Skip to main content
12,697,545 members (27,855 online)
Click here to Skip to main content

Stats

54.3K views
2.4K downloads
43 bookmarked
Posted

Bar Graph Control

, 5 Feb 2007 CPOL
A useful bar graph control, derived from CStatic.
// GraphTestDlg.h : header file
//

#if !defined(AFX_GRAPHTESTDLG_H__0924C1FF_BB99_4B6C_92B4_B53B24AC4837__INCLUDED_)
#define AFX_GRAPHTESTDLG_H__0924C1FF_BB99_4B6C_92B4_B53B24AC4837__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "GraphCtrl.h"
#include "mystatic.h"
#include "afxwin.h"
/////////////////////////////////////////////////////////////////////////////
// CGraphTestDlg dialog

class CGraphTestDlg : public CDialog
{
// Construction
public:
	CGraphTestDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CGraphTestDlg)
	enum { IDD = IDD_GRAPHTEST_DIALOG };
	CGraphCtrl	m_Graph;
	int		m_Scale;
	BOOL	m_Simulate;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CGraphTestDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CGraphTestDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnSelchangeScaleCombo();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnCheckSimu();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
public:
	int m_iYScale;
	afx_msg void OnBnClickedSetScale();
	afx_msg void OnBnClickedMoveUp();
	afx_msg void OnBnClickedMoveDown();
	afx_msg void OnEnChangeScale();
	INT m_DispFrom;
	INT m_DispTo;
	CMyStatic m_BGStat;
	CMyStatic m_AxsStat;
	CMyStatic m_TxtStat;
	afx_msg void OnBnClickedTxtcolor3();
	afx_msg void OnBnClickedAxcolor2();
	afx_msg void OnBnClickedBgcolor();
	afx_msg void OnCbnSelchangeComboBar();
	CMyStatic m_BarStat;
	CComboBox m_BarCombo;
	afx_msg void OnBnClickedBarcolor();
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_GRAPHTESTDLG_H__0924C1FF_BB99_4B6C_92B4_B53B24AC4837__INCLUDED_)

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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Shaibujan
Team Leader
India India
Mr. Shaibujan has got 9+ yrs of programming experience in C/C++, on various domains like Cryptography, Biometric Security, Network Security, Pattern Recognition, Image Processing, MPEG2, MPEG4, H.264, AAC etc.

You may also be interested in...

Pro
Pro
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170118.1 | Last Updated 6 Feb 2007
Article Copyright 2007 by Shaibujan
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid