MFC程序实时显示鼠标坐标位置
在MFC单文档中快速实现坐标点附上代码:
void CVoronoi2View::OnMouseMove(UINT nFlags, CPoint point)
{
CString str;
CMainFrame *pFrame = (CMainFrame*)AfxGetApp()->m_pMainWnd;
CStatusBar *m_StatusBar = (CStatusBar*)GetParentFrame()->GetDescendantWindow(ID_VIEW_STATUS_BAR);
str.Format(L"(%4d,%4d)", point.x, point.y);
m_StatusBar->SetPaneText(0, str);
CView::OnMouseMove(nFlags, point);
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)