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

📄 linechartctrl.h

📁 此 InterVolve 应用程序不仅介绍了使用 Microsoft 基础类的基本知识
💻 H
字号:
// LineChartCtrl.h : header file
//
// Written by Yuheng Zhao (yuheng@ministars.com) 
// http://www.ministars.com
// The original idea and part of the code from Ken C. Len's CHistogramCtrl
// http://www.codeguru.com/controls/histogram_control.shtml
//
// Copyright (c) 1998.
//
// This code may be used in compiled form in any way you desire. This
// file may be redistributed unmodified by any means PROVIDING it is 
// not sold for profit without the authors written consent, and 
// providing that this notice and the authors name is included. If 
// the source code in  this file is used in any commercial application 
// then a simple email would be nice.
//
// This file is provided "as is" with no expressed or implied warranty.
// The author accepts no liability if it causes any damage whatsoever.
// It's free - so you get what you pay for.
//

#ifndef __LINECHARTCTRL_H__
#define __LINECHARTCTRL_H__

#include <afxtempl.h>

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

	COLORREF m_colorLine;
	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, CLineChartItem*> CItemArray;

/////////////////////////////////////////////////////////////////////////////
// CLineChartCtrl window

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

	CLineChartCtrl();
	UINT m_nVertical;

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

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

// Implementation
public:
	void Go();
	BOOL Add(COLORREF color, UINT Upper, UINT Lower );
	virtual ~CLineChartCtrl();

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

	CDC      m_MemDC;
	CBitmap  m_Bitmap;
};

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

⌨️ 快捷键说明

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