|
Getting no left mouse click event |
Posted by Tom on Mar-20-2012 22:45 |
|
I am displaying ChartDirector chart in a MFC view. As suggested in this forum,
I put following code. And everything is working fine.
void CGraphView::OnInitialUpdate()
{
CView::OnInitialUpdate();
m_ChartViewer.Create(0, WS_CHILD | WS_VISIBLE | SS_BITMAP | SS_NOTIFY, CRect(0, 0, 0, 0), this, 1);
}
One thing I would like to do now is to have a click event on the chart. But having usual
MFC left-mouse-up event does not catch a click on the chart. So I saw the demo examples. In the demo, it actually catches the event in the chart area predefined in resource. But in my case, I don't have the predefined area corresponding to the chart.
How can I do that in my view? |
Re: Getting no left mouse click event |
Posted by Tom on Mar-20-2012 23:03 |
|
Never mind. I didn't know that 1 is for the resource id in the Create statement. I did the same thing as in demo and it worked. I just use resource id 1 when I set control message.
ON_CONTROL_RANGE(BN_CLICKED,1,1, OnChartClick)
Tom wrote:
I am displaying ChartDirector chart in a MFC view. As suggested in this forum,
I put following code. And everything is working fine.
void CGraphView::OnInitialUpdate()
{
CView::OnInitialUpdate();
m_ChartViewer.Create(0, WS_CHILD | WS_VISIBLE | SS_BITMAP | SS_NOTIFY, CRect(0, 0, 0, 0), this, 1);
}
One thing I would like to do now is to have a click event on the chart. But having usual
MFC left-mouse-up event does not catch a click on the chart. So I saw the demo examples. In the demo, it actually catches the event in the chart area predefined in resource. But in my case, I don't have the predefined area corresponding to the chart.
How can I do that in my view?
|
|