⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 graphctrl.h

📁 evc程序开发源代码
💻 H
字号:
#if !defined(AFX_GRAPHCTRL_H__49A61F3B_12CB_4BCB_9D87_2B23CF23958C__INCLUDED_)
#define AFX_GRAPHCTRL_H__49A61F3B_12CB_4BCB_9D87_2B23CF23958C__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
/////////////////////////////////////////////////////////////////////////////
// MECGraphCtrl window
class MECPoint: public CObject
{
public:
	double x;
	double y;
};
class MECGraphCtrl : public CWnd
{
// Construction
public:
	MECGraphCtrl();

// Attributes
public:
		MECPoint m_oPoints[MAX_PATH], m_oNewPoint,m_dPoints[MAX_PATH];
		int m_nLastIndexPoint;

		COLORREF m_crBackColor;        // background color
		COLORREF m_crGridColor;        // grid color
		COLORREF m_crPlotColor;        // data color  

		int m_nClientHeight;
        int m_nClientWidth;
	    int m_nPlotHeight;
	    int m_nPlotWidth;

		double m_dLowerLimit, m_dXLower;        // lower bounds
		double m_dUpperLimit, m_dXUpper;        // upper bounds
		double m_dRange, m_XRange;
		double m_dVerticalFactor, m_dHorizontalFactor;
  
		CRect  m_rectClient;
		CRect  m_rectPlot;
		CPen   m_penPlot;
		CBrush m_brushBack;

		CDC     m_dcGrid;
		CDC     m_dcPlot;
		CBitmap *m_pbitmapOldGrid;
		CBitmap *m_pbitmapOldPlot;
		CBitmap m_bitmapGrid;
		CBitmap m_bitmapPlot;

		int m_nYDecimals, m_nXDecimals;
	
		CString m_strXUnitsString;
		CString m_strYUnitsString;
// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(MECGraphCtrl)
	virtual BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID=NULL);
	//}}AFX_VIRTUAL

// Implementation
public:
	void SetXRange(double dLower, double dUpper, int nDecimalPlaces);
	void InvalidateCtrl();
	void DrawPoints();
	void AppendPoint(double dPointX, double dPointY);
	void SetRange(double dLower, double dUpper, int nDecimalPlaces);
	void SetXUnits(CString string);
	void SetYUnits(CString string);
	void SetGridColor(COLORREF color);
	void SetPlotColor(COLORREF color);
	void SetBackgroundColor(COLORREF color);
	virtual ~MECGraphCtrl();

	// Generated message map functions
protected:
	//{{AFX_MSG(MECGraphCtrl)
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnPaint();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

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

#endif // !defined(AFX_GRAPHCTRL_H__49A61F3B_12CB_4BCB_9D87_2B23CF23958C__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -