|
-
October 4th, 1999, 04:38 AM
#1
Menu, same question again
I wrote the code for check and uncheck the menu in dialog base app,
but it doesn't work.
void CMyDlg::OnEditShow()
{
// TODO: Add your command handler code here
// Do something...
}
void CMyDlg::OnUpdateEditShow(CCmdUI* pCmdUI)
{
// TODO: Add your command update UI handler code here
if( m_bShow==TRUE )
{
pCmdUI->SetCheck(1);
m_bShow=FALSE;
}
else
{
pCmdUI->SetCheck(0);
m_bShow=TRUE;
}
}
Could anyone tell me how can I check and uncheck the menu in dialog base app?
Thanks in advance.
-
October 4th, 1999, 07:00 AM
#2
Re: Menu, same question again
Add this to the command code:
CMenu* pMenu = GetMenu();
pMenu->CheckMenuItem(yourID, MF_BYCOMMAND | MF_CHECKED);
Let me know if this helps you.
Best regards,
Faby
-
October 4th, 1999, 08:54 AM
#3
Re: Menu, same question again
Hi Faby,
Thanks for your code, it works.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|