Home > Back-end >  3 d mouse hover display the current coordinates
3 d mouse hover display the current coordinates

Time:09-20

Using surface painting three-dimensional figure, want to put the mouse go up and then display the current coordinates * (X, Y, Z), not a point on the landing net, just copy the code, where still need to set up?
Void CIsosurfaceDlg: : OnOnMouseMoveTchart1 (long Shift, long X, long Y)
{
//TODO: Add your the control notification handler code here
Int mPoint=1;
The double xValue=https://bbs.csdn.net/topics/m_chart1.Series (0). XScreenToValue (X);//+ 0.5
MPoint=(int) (xValue);
If (mPoint & lt; 0)
{
return ;
}
CValueList xList=m_chart1. Series (0). GetXValues ();
CValueList yList=m_chart1. Series (0). GetYValues ();
Cstrings 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=view GetAsAnnotation ();
Cstrings strTopNote;
StrTopNote. The Format (" Time: % ss Temperature: % 3 d ", strXLabel, dYLabel);
Anntool. SetText (strTopNote);
}

CodePudding user response:

Why didn't respond
  • Related