charttitle.h

来自「BCB CHART控件 在Wince5.0下的移植」· C头文件 代码 · 共 66 行

H
66
字号
/*
 *
 *	ChartTitle.h
 *
 *	Written by C閐ric Moonen (cedric_moonen@hotmail.com)
 *
 *
 *
 *	This code may be used for any non-commercial and commercial purposes in a compiled form.
 *	The code may be redistributed as long as it remains unmodified and providing that the 
 *	author name and this disclaimer remain intact. The sources can be modified WITH the author 
 *	consent only.
 *	
 *	This code is provided without any garanties. I cannot be held responsible for the damage or
 *	the loss of time it causes. Use it at your own risks
 *
 *	An e-mail to notify me that you are using this code is appreciated also.
 *
 *
 */

#if !defined(AFX_CHARTTITLE_H__49972787_6D28_4F81_A12F_420947456913__INCLUDED_)
#define AFX_CHARTTITLE_H__49972787_6D28_4F81_A12F_420947456913__INCLUDED_

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

#include "ChartObject.h"

#include <vector>
#include <string>


class CChartTitle : public CChartObject  
{
	friend CChartCtrl;

public:
	size_t GetStringCount() const;
	std::wstring GetString(size_t Index) const;
	void AddString(std::wstring NewString);
	void RemoveAll();

	void SetFont(int iPointSize,std::wstring strFaceName)
	{
		m_iFontSize = iPointSize;
		m_strFontName = strFaceName;
	}

	CChartTitle(CChartCtrl* pParent);
	virtual ~CChartTitle();

private:
	CSize GetSize(CDC* pDC);
	void Draw(CDC *pDC);

	std::vector<std::wstring> m_StringArray;

	std::wstring m_strFontName;

	int         m_iFontSize;
};

#endif // !defined(AFX_CHARTTITLE_H__49972787_6D28_4F81_A12F_420947456913__INCLUDED_)

⌨️ 快捷键说明

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