Example #1
0
CChartCtrl::CChartCtrl()
{
	RegisterWindowClass();

	m_BorderColor = RGB(0,0,0);
	BackColor = GetSysColor(COLOR_BTNFACE);
	EdgeType = EDGE_RAISED;

	CChartAxis* pBottom = new CChartAxis(this,true);
	CChartAxis* pLeft = new CChartAxis(this,false);
	CChartAxis* pTop = new CChartAxis(this,true);
	pTop->SetVisible(false);
	pTop->SetSecondary(true);
	CChartAxis* pRight = new CChartAxis(this,false);
	pRight->SetVisible(false);
	pRight->SetSecondary(true);

	m_pAxisList.push_back(pBottom);
	m_pAxisList.push_back(pLeft);
	m_pAxisList.push_back(pTop);
	m_pAxisList.push_back(pRight);

	m_pLegend = new CChartLegend(this);
	m_pTitles = new CChartTitle(this);
	
	m_bMemDCCreated = false;
	m_bPanEnabled = true;
	m_bRMouseDown = false;

	m_bZoomEnabled = true;
	m_bLMouseDown = false;
}
void CRegisterValueAnalyzerDlg::OnBnClickedAxisvisibleCheck()
{
	CChartAxis* pAxis = GetSelectedAxis();
	if ( ((CButton*)GetDlgItem(IDC_AXISVISIBLE_CHECK))->GetCheck() == 1)
		pAxis->SetVisible(true);
	else
		pAxis->SetVisible(false);	
	m_ChartCtrl.RefreshCtrl();
}