在VC6.0中,多文档结构,怎么实现在状态栏显示鼠标当前位置所在点的坐标的功能

在VC6.0中,多文档结构,如何实现在状态栏显示鼠标当前位置所在点的坐标的功能?
我在onmousemove函数里添加了以下代码

CString sMousePos;
sMousePos.Format("x=%d,y=%d",point.x,point.y);
GetParent()->GetDescendantWindow(AFX_IDW_STATUS_BAR)->SetWindowText(sMousePos);

编译通过,运行时会提示指针有问题.该怎么改??

------解决方案--------------------
GetParent()->GetDescendantWindow(AFX_IDW_STATUS_BAR)->SetWindowText(sMousePos);
-->
AfxGetMainWnd()->GetDescendantWindow(AFX_IDW_STATUS_BAR)->SetWindowText(sMousePos);