BCG中使用状态栏显示状态信息
void CSuperEditView::OnMouseMove(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
// set initial DC state
CClientDC dc(this);
VERIFY(dc.SaveDC() != 0);
OnPrepareDC(&dc);
dc.DPtoLP(&point);
CMainFrame *pFrame=(CMainFrame*)AfxGetApp()->m_pMainWnd;
CBCGPStatusBar *pStatus = (CBCGPStatusBar *)&pFrame->GetStatusBar();
CString state;
state.Format(_T("x=%d y=%d;X=%.0f Y=%.0f"), point.x, point.y,
((float)point.x)/GetScale(), ((float)point.y)/GetScale());
pStatus->SetPaneText(2,state);
//if (m_pPageView->PtInPageView(point))//c by zcl for out range ctrl
{
m_pPageView->OnMouseMove(this, &dc, nFlags, point);
}
VERIFY(dc.RestoreDC(-1));
CScrollView::OnMouseMove(nFlags, point);
}