graphlegend.cpp
来自「一个简单的学生学籍管理工具。vc编写。 有喜欢的可以批评指正^_^」· C++ 代码 · 共 56 行
CPP
56 行
// GraphLegend.cpp : implementation file
//
#include "stdafx.h"
//#include "testdraw.h"
#include "GraphLegend.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CGraphLegend
CGraphLegend::CGraphLegend()
{
legendLength = 0;
for(int i = 0; i < 10; i++)
SetLegendText(i, "");
}
CGraphLegend::~CGraphLegend()
{
}
BEGIN_MESSAGE_MAP(CGraphLegend, CStatic)
//{{AFX_MSG_MAP(CGraphLegend)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CGraphLegend message handlers
void CGraphLegend::SetLegendText(int datagroup, CString label)
{
legendLabels[datagroup] = label;
if(label.GetLength() > legendLength)
legendLength = label.GetLength();
}
CString CGraphLegend::GetLegendText(int datagroup)
{
return legendLabels[datagroup];
}
int CGraphLegend::GetLegendLength()
{
return legendLength;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?