程序中调用了CChartCtrl这个开源代码作图,本人还是学习阶段,代码基本是参考网站提供的demo版本的。不同的是例子中是基于对话框的程序,我的是基于单文档的程序,那个自定义空间就放在FormView中。调用没有问题了,但是当鼠标移到作图区域,程序就意外终止了。CChartCtrl中是用OnMouseMove的函数的,是自动调用的。 我不知道为什么例子中就没有问题,我的鼠标移动就出错呢? 是不是需要定义那些参数? 请有使用或者了解CChartCtrl的高手帮忙指导一下,非常感谢阿。
解决方案 »
- VC调试模式问题
- win32 窗口CPU占用率为什么总是100%
- 获取dlg里面的button的位置是什么函数?
- CSDN的新闻问什么不能保存啊,很不爽,鄙视编辑*****************
- 有关显示list控件中某一列颜色的问题
- 关于VC6.0调用WebService的问题
- user breakpoint called at 0x77f813b1是什么错阿。急,在线!!
- @@@@@@@@@奇怪的问题:状态条显示为什么总是暗色的@@@@@@@@@@@@@
- 关于完成端口的接收数据的问题
- 关于MDI程序的难题,高手请进!!一定给分!!
- 在vs2010如何添加孙鑫vc++教程里的Pop-up Menu
- 求助MIDL问题,请教高手
{
if (m_bRMouseDown && m_bPanEnabled)
{
if (point != m_PanAnchor)
{
EnableRefresh(false);
if (m_pAxes[LeftAxis])
m_pAxes[LeftAxis]->PanAxis(m_PanAnchor.y,point.y);
if (m_pAxes[RightAxis])
m_pAxes[RightAxis]->PanAxis(m_PanAnchor.y,point.y);
if (m_pAxes[BottomAxis])
m_pAxes[BottomAxis]->PanAxis(m_PanAnchor.x,point.x);
if (m_pAxes[TopAxis])
m_pAxes[TopAxis]->PanAxis(m_PanAnchor.x,point.x);
RefreshCtrl();
EnableRefresh(true);
// Force an immediate repaint of the window, so that the mouse messages
// are by passed (this allows for a smooth pan)
UpdateWindow(); m_PanAnchor = point;
}
} if (m_bLMouseDown && m_bZoomEnabled)
{
m_rectZoomArea.BottomRight() = point;
Invalidate();
} for (int i=0; i<4; i++)
{
if (m_pAxes[i])
m_pAxes[i]->m_pScrollBar->OnMouseLeave();
}
CWnd* pWnd = ChildWindowFromPoint(point);
if (pWnd != this)
{
CChartScrollBar* pScrollBar = dynamic_cast<CChartScrollBar*>(pWnd);
if (pScrollBar)
pScrollBar->OnMouseEnter();
} if (m_PlottingRect.PtInRect(point))
{
TCursorMap::iterator iter = m_mapCursors.begin();
for (iter; iter!=m_mapCursors.end(); iter++)
iter->second->OnMouseMove(point);
Invalidate();
} if (!m_bMouseVisible && m_PlottingRect.PtInRect(point))
SetCursor(NULL);
else
SetCursor(::LoadCursor(NULL,IDC_ARROW)); SendMouseEvent(CChartMouseListener::MouseMove, point);
CWnd::OnMouseMove(nFlags, point);
}这是CChartCtrl中的OnMouseMove函数。
确定