写了一个对话框程序,想要在鼠标点到工具按钮时,状态栏显示工具栏的提示信息,可总是报错,请大神帮我看看
这是OnMouseMove的程序
void CEasyRecognizeDlg::OnMouseMove(UINT nFlags, CPoint point)
{
CString str;
CRect rect;
GetDlgItem(ID_OPENIMAGE)->GetWindowRect(&rect); //获取按钮区域
if(rect.PtInRect(point)) //判断鼠标是否在按钮中
{
GetDlgItem(ID_OPENIMAGE)->GetWindowText(str); //获取按钮文本
m_StatusBar.SetPaneText(0,"sdf"); //在状态栏显示按钮文本
}
CDialog::OnMouseMove(nFlags, point);
}