1
.h
2 afx_msg void OnUpdateButtonStatus(CCmdUI * pCmdUI);
3
4 .cpp
5
6 BEGIN_MESSAGE_MAP(xxxx, xxxx)
7 // {{AFX_MSG_MAP(CMainFrame)
8 //
9 ON_UPDATE_COMMAND_UI(MY_ID, OnUpdateButtonStatus)
10 // }}AFX_MSG_MAP
11 END_MESSAGE_MAP()
12
13 void xxxx::OnUpdateButtonStatus(CCmdUI * pCmdUI)
14 {
15if ()
16{
17pCmdUI->Enable(FALSE);
18}
19}
20
2 afx_msg void OnUpdateButtonStatus(CCmdUI * pCmdUI);
3
4 .cpp
5
6 BEGIN_MESSAGE_MAP(xxxx, xxxx)
7 // {{AFX_MSG_MAP(CMainFrame)
8 //
9 ON_UPDATE_COMMAND_UI(MY_ID, OnUpdateButtonStatus)
10 // }}AFX_MSG_MAP
11 END_MESSAGE_MAP()
12
13 void xxxx::OnUpdateButtonStatus(CCmdUI * pCmdUI)
14 {
15if ()
16{
17pCmdUI->Enable(FALSE);
18}
19}
20