带有复选框选择的菜单 [英] menu with checkbox selections
本文介绍了带有复选框选择的菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
我想使用Visual C ++ 6.0在GUI中创建菜单.应该允许选择多个子菜单的复选框.有人可以建议如何进行操作吗?
Timkee
Hi
I want to create a menu in my GUI using Visual C++ 6.0. which should allow multiple checkbox selections of submenus.Can anyone suggest how to go about?
Timkee
推荐答案
要在菜单项中添加/删除检查,请为该菜单项添加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);
}
这篇关于带有复选框选择的菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文