|
Problem with setMouseUsage() |
Posted by Raul on Oct-03-2011 23:54 |
|
Hi,
I am having some toruble with setMouseUsage();
I am doing the following:
m_ChartViewer.setMouseUsage(Chart::MouseUsageScroll);
or
m_ChartViewer.setMouseUsage(1);
and nothing happens to the mouse pointer.
Can anybody help me please? |
Re: Problem with setMouseUsage() |
Posted by Raul on Oct-04-2011 00:04 |
|
By the way, I am displaying it with:
ChartViewer.setChart(c); |
Re: Problem with setMouseUsage() |
Posted by Peter Kwan on Oct-04-2011 02:01 |
|
Hi Raul,
Note that Chart::MouseUsageScroll will not automatically change the mouse cursor when the cursor is over the plot area. It will change the cursor only if you drag the mouse to attempt to scroll the chart.
For testing, you may use Chart::MouseUsageZoomIn instead. In this mode, the mouse will change to a magnifying glass icon when it moves over the plot area.
To test it, you may try the "Hello World" sample code. I have just tried to add the following line in the MFC "Hello World" sample code, and it works normally.
m_ChartViewer.setMouseUsage(Chart::MouseUsageScroll);
If you try the "Hello World" sample code and it works, but it does not work in your own code, is it possible to create a sample project (eg. modify from the MFC "Hello World" sample code), so I may try to reproduce the problem?
There are many reasons why mouse actions has no effect in C++. For example, certain container will not forward mouse messages to controls in certain cases (eg. when they are not "in focus"), in which case no mouse action is possible for the control. (Many of these cases are mentioned in Microsoft documentation.) So to diagnose the problem, I would need to have the exact code to see how your GUI is configured.
Regards
Peter Kwan |
|