状态条文字的改变是通过发送WM_SETMESSAGESTRING来设置的,如果重载该消息的处理,就可以监视状态条文字的改变,处理该消息时,可采用如下代码
LPCTSTR lpsz = NULL;
CString strMessage;// set the message bar text
if (lParam != 0)
{
ASSERT(wParam == 0);    // can't have both an ID and a string
lpsz = (LPCTSTR)lParam; // set an explicit string
}
else if (wParam != 0)
{
strMessage.LoadString(wParam);
lpsz = strMessage;
}// then use the lpsz variable to implement you function但还要记住将该消息发给父类,否则状态条不显示文字。
以上的前提是你的窗口类以及状态条都是标准方式,且你只关心状态条的第一栏的提示文字。