Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

CNiGraph::TrackZoomRectXY on MDI Child Window

At the moment, I'm working in Visual Studio C++ mfc and using a CFormView as my MDI Child. It has a CNiGraph on it named m_graph declared publicly. I'm programmatically changing the track mode by users right clicking the graph and being able to select their track mode from the resulting popup menu, however, TrackZoomRectXY isn't working properly.

When making a call such as
m_graph.TrackMode = CNiGraph::TarckPanPlotAreaXY;
I can left click the graph, holding the mouse down and pan anywhere I want. HOWEVER...

when I make a call such as
m_graph.TrackMode::TrackZoomRectXY it doesn't immediately take affect. You must double click on the graph not releasing the mouse button on the second click to enable the TrackZoomRe
ctXY (same thing for TrackZoomRectX and TrackZoomRectY). When I go to click anywhere else outside of the graph after zooming, no mouse events are reported to those locations. I must switch my track mode to any non-zoom tracking mode to be able to even select the menus at the top of the main program.

It's almost as though the graph object requires you to double click for it to be able to report mouse down events and to get out the track mode must be completely changed. Please, let me know if I'm missing something or if this is a bug. I'm assuming the latter as all panning functionality works well.
TIA,
Adam
0 Kudos
Message 1 of 4
(3,557 Views)
Hello antadam,

I was unable to recreate this problem that you're describing. What version of the CWUI ActiveX controls do you have? I am using the 7.0.0.343 version of CWUI.OCX, which you can get by downloading and installing the Measurement Studio 6.0 Updater:

Measurement Studio 6.0 Updater

I tested using Microsoft Visual C++ 6.0 (with Service Pack 5) and this example program:

C:\Program Files\National Instruments\MeasurementStudio\VC\Examples\Ui\Graph\Simple Graph

Can you please try this example program and let me know if you see the same problematic behavior?

Thanks,
David Mc.
NI Applications Engineer
0 Kudos
Message 2 of 4
(3,557 Views)
I'm currently using Measurement Studio 7 and cwui is version 7.0.0.341. My apologies for not letting you know that I'm using Visual C++ 7.

The biggest thing that's getting me is that this is an MDI application with a child window having the problems, not a dialog app (which if I remember correctly, Simple Graph is...if I'm wrong, my apologies).

I've posted a screenshot with a description of my problem here so that we're both on the same page. I appreciate the response. It still seems as though something in the activex control is taking over as when I right-click on the graph it should show me a popup menu which it does. However, if I enter zoomrectxy for my trackmode it ends up tha
t right-clicking anywhere else on the screen shows that same popup menu and not the one for the other corresponding windows which are dockable floating windows. You'll understand better by looking at the screenshot.

On a side note, if I set the default trackmode (i.e. in teh activex control and not programmatically) to zoomrectxy, there seems to be no problem.

I greatly appreciate the assistance. Let me know of anything else you may need from me.
Take care,
Adam
0 Kudos
Message 3 of 4
(3,556 Views)
Hello Adam,

Can you please post a small Visual C++ 7 MDI example that illustrates the problem so I can take a look at it?

David Mc.
NI Application Engineer
0 Kudos
Message 4 of 4
(3,557 Views)