Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I find the Window Rect of only the Graph Plot Area?

I am developing my own zoom option so that I can only zoom only one plot rather than the whole thing. I am using TrackPlotArea Events and drwaing my own zoom window. However, I want to only show the zoom window inside the Plot Area for which I need the Window Rectangle. I can get the rectangle for thw whole graph using CNiGraph::GetWindowRect (since it is derived off CWnd). I could manually calculate the plot area but this changes when the X and Y labels change.

Any other ideas on how to do the above would also be helpful?
0 Kudos
Message 1 of 3
(3,480 Views)

Unfortunately, there is not a way to do this with CNiGraph. However, the upcoming .NET graph has a property called PlotAreaBounds that gives you exactly what you're looking for. Check out the Measurement Studio Technology Preview Program for more information on the .NET graph.

- Elton

0 Kudos
Message 2 of 3
(3,480 Views)

Hello

With the 8.0 version of the CNiGraph controls, you can now get the plot area bounds by using the GetPlotAreaBounds() method. The 8.0 controls also now have an event for the plot area bounds change. You can download the new control by going to the following link:

Measurement Studio Version 6.0 for Windows -- Update for Visual Basic 6.0 and Visual C++ 6.0 (patch)
http://digital.ni.com/softlib.nsf/websearch/2AAC97491D073A6C86256EEF005374CE?opendocument&node=132060_US

For more information about how to use the new methods from Visual Studio 6.0, refer to the new features readme on the download page.

Thanks

Bilal Durrani
NI
0 Kudos
Message 3 of 3
(3,379 Views)