用surface的畫的三維圖,想把滑鼠放上去就顯示當前坐標值*(X、Y、Z),抄網上的一點不行,只是抄了代碼,哪里還需要設定么?
void CIsosurfaceDlg::OnOnMouseMoveTchart1(long Shift, long X, long Y)
{
// TODO: Add your control notification handler code here
int mPoint = -1;
double xValue = m_chart1.Series(0).XScreenToValue(X) ; //+ 0.5
mPoint = (int)(xValue);
if(mPoint < 0)
{
return ;
}
CValueList xList = m_chart1.Series(0).GetXValues();
CValueList yList = m_chart1.Series(0).GetYValues();
CString strXLabel = m_chart1.Series(0).GetPointLabel(mPoint);
int dYLabel = (int)yList.GetValue(mPoint);
CToolList tlist = m_chart1.GetTools();
CTools tools = tlist.GetItems(1);
CAnnotationTool anntool = tools.GetAsAnnotation();
CString strTopNote;
strTopNote.Format("Time: %ss Temperature: %3d",strXLabel, dYLabel);
anntool.SetText(strTopNote);
}
uj5u.com熱心網友回復:
為什么沒有回復轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/58077.html
下一篇:關于word操作問題。
