15,979
社区成员
发帖
与我相关
我的任务
分享
m_HSChartCtrl.Create(&m_tab,rect,2);
CChartAxis *pAxis = NULL;
//初始化坐标
pAxis = m_HSChartCtrl.CreateStandardAxis(CChartCtrl::BottomAxis);
pAxis->SetAutomatic(true);
pAxis = m_HSChartCtrl.CreateStandardAxis(CChartCtrl::LeftAxis);
pAxis->SetAutomatic(true);
m_pLineSerie = m_HSChartCtrl.CreateLineSerie();
UpdateData(FALSE);
m_tab.AddTab(&m_HSChartCtrl,_T("HightSpeedCtrl"));
m_tab.SetActiveTab(0);//设置显示第一页;
m_tab.ShowWindow(SW_SHOWNORMAL);
CRect TabBRect,TabTRect;
m_tab.GetWindowRect(rect);
ScreenToClient(rect);
m_tab.GetTabArea(TabTRect,TabBRect);
rect.top+=TabTRect.Height();
//创建图表坐标轴**
CChartAxis *pAxis = NULL;
CChartDateTimeAxis* pDateAxis = NULL;
pDateAxis = NULL;
pDateAxis = m_ChartCtrl1.CreateDateTimeAxis(CChartCtrl::BottomAxis);
pDateAxis->SetAutomatic(true);
pDateAxis->SetTickLabelFormat(false, _T("%m.%d"));
pAxis = m_ChartCtrl1.CreateStandardAxis(CChartCtrl::LeftAxis);
pAxis->SetAutomatic(true);