Closed xiaokaixuan closed 5 years ago
BOOL CTestDlg::ContinueModal() { if (m_toolBar.IsWindowVisible()) { m_toolBar.OnUpdateCmdUI((CFrameWnd*)this, TRUE); } CCmdUI cmdUI; cmdUI.m_pParentMenu = GetMenu(); if (NULL != cmdUI.m_pParentMenu) { for (UINT ui(0); ui < cmdUI.m_pParentMenu->GetMenuItemCount() ; ++ui) { cmdUI.m_pMenu = cmdUI.m_pParentMenu->GetSubMenu(ui); cmdUI.m_nIndexMax = cmdUI.m_pMenu->GetMenuItemCount(); for (UINT uIndex(0); uIndex < cmdUI.m_nIndexMax; ++uIndex) { cmdUI.m_nID = cmdUI.m_pMenu->GetMenuItemID(uIndex); cmdUI.m_nIndex = uIndex; cmdUI.DoUpdate(this, TRUE); } } } return CDialog::ContinueModal(); }