我设置了一个菜单,并添加了一个启用和禁用菜单的处理函数
但好像天了这个处理函数后,菜单一直被禁用:
CGobangView::CGobangView()
{
// TODO: add construction code here
m_P_CMenuState = true;
m_P_CMenuState = true;
}
void CGobangView::OnUpdatePlayer1toplayer2(CCmdUI* pCmdUI)
{
// TODO: Add your command update UI handler code here
pCmdUI->Enable(m_P_PMenuState);
}
void CGobangView::OnUpdatePlayertocomputer(CCmdUI* pCmdUI)
{
// TODO: Add your command update UI handler code here
pCmdUI->Enable(m_P_PMenuState);
}
但好像天了这个处理函数后,菜单一直被禁用:
CGobangView::CGobangView()
{
// TODO: add construction code here
m_P_CMenuState = true;
m_P_CMenuState = true;
}
void CGobangView::OnUpdatePlayer1toplayer2(CCmdUI* pCmdUI)
{
// TODO: Add your command update UI handler code here
pCmdUI->Enable(m_P_PMenuState);
}
void CGobangView::OnUpdatePlayertocomputer(CCmdUI* pCmdUI)
{
// TODO: Add your command update UI handler code here
pCmdUI->Enable(m_P_PMenuState);
}
void CGobangView::OnPlayer1toplayer2()
{
// TODO: Add your command handler code here
this->m_P_PMenuState = false;
this->m_P_CMenuState = false;
}
void CGobangView::OnPlayertocomputer()
{
// TODO: Add your command handler code here
this->m_P_CMenuState = false;
this->m_P_PMenuState = false;
}
{
// TODO: Add your command handler code here
this->m_P_PMenuState = false;
this->m_P_CMenuState = false;
}
void CGobangView::OnPlayertocomputer()
{
// TODO: Add your command handler code here
this->m_P_CMenuState = false;
this->m_P_PMenuState = false;
}