状态栏的消息显示,MSDN里面有三种方式
There are three ways to update the text in a status-bar pane:
- Call
CWnd::SetWindowText
to update the text in pane 0 only.- Call
CCmdUI::SetText
in the status bar’s ON_UPDATE_COMMAND_UI handler.- Call
SetPaneText
to update the text for any pane.
- 用***
UPDATE_COMMAND_UI
*** 与***SetText
***在状态栏插入消息,显示时间消息
class CMainFrame : public CFrameWnd
{
public:
CMainFrame() noexcept;
protected:
DECLARE_DYNAMIC(CMainFrame)
// 重写
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra