更新时间:2023-11-20 23:10:22
要在菜单项中添加/删除检查,请为该菜单项添加OnUpdatexxx()处理函数.
CCmdUI [
To add/remove a check in a menu item, you add an OnUpdatexxx() handler for that menu item.
The CCmdUI[^] instance handed to you can be used for this.
Something like:
void CMyFrame::OnUpdateShowMyToolbar(CCmdUI *pCmdUI)
{
pCmdUI->SetCheck(IsMyToolbarVisible() ? 0 : 1);
}