05-29-2008 11:31 PM
06-02-2008 10:44 AM
06-03-2008 11:51 AM
Hello Matt,
Thats exactly what I was looking for. I wanted to add text labels to a CNiGraph3D, and could not till now. I even tried using the Visual C++ MFC CDC (device context) class to add text, but it did not work well. The example you suggested using the CNiCursor3D adds the text labels exactly the way I wanted. Thanks for your help.
If anyone wants, here is the code I used in Measurement Studio for Visual C++ 6.0 that adds the text label:
CNiCursor3D niMarkerLabel;
niMarkerLabel = pMyNiGraph3D->Cursors.Add();
niMarkerLabel.Name = sLabel;
niMarkerLabel.NameVisible = true;
niMarkerLabel.PositionVisible = false;
niMarkerLabel.PointStyle = CNiCursor3D::None;
niMarkerLabel.LineStyle = CNiCursor3D::LineNone;
niMarkerLabel.TextBackgroundTransparency = 100;
niMarkerLabel.SnapMode = CNiCursor3D::SnapFixed;
niMarkerLabel.SetPosition(dX, dY, dZ); // X, Y, and Z posistions where the text needs to be added.
niMarkerLabel.Visible = true;
niMarkerLabel.Enabled = false;
Thanks,
Arvind