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

📄 testctrl.h

📁 用VC编写的完整采样程序
💻 H
字号:


#ifndef __TESTCTRL_H__
#define __TESTCTRL_H__

#include <afxtempl.h>

class CTestItem:public CObject
{
public:
	CTestItem() {;}

	COLORREF m_colorLine;
	UINT     m_nLineWidth;
	
//	UINT     m_nLower;		// lower bounds
//  UINT     m_nUpper;		// upper bounds
	UINT     m_nPos;		// current position within bounds
	UINT     m_nOldPos;		// last position within bounds
};

typedef CTypedPtrArray <CObArray, CTestItem*> CItemArray;

/////////////////////////////////////////////////////////////////////////////
// CTestCtrl window

class CTestCtrl : public CWnd
{
// Construction
public:
	static BOOL RegisterWndClass(HINSTANCE hInstance);

	CTestCtrl();
	UINT m_nVertical;
	float scale;
	float range;

// Attributes
public:
	CItemArray m_items;
	UINT SetPos(int nIndex, UINT nPos);
	int nRange;
	void InvalidateCtrl();
//	void InvalidateCtrl(int nRange);//hyq
	void DrawSpike(int PointNum);//,int nRange);

	// Operations
public:
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTestCtrl)
	public:
	//}}AFX_VIRTUAL

// Implementation
public:
	void RangeChange();
	void clear();
 // CLineDoc Getdocument();                
	BOOL Add(COLORREF color, UINT LineWidth);
	virtual ~CTestCtrl();

	// Generated message map functions
protected:
	//{{AFX_MSG(CTestCtrl)
	afx_msg void OnPaint();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

	CDC      m_MemDC;
	CDC      m_MemDC1;
	CBitmap  m_Bitmap;
	CBitmap  m_Bitmap1;
};

/////////////////////////////////////////////////////////////////////////////
#endif

⌨️ 快捷键说明

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