扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:Adding 来源:YESKY 2007年11月16日
关键字:
m_pFileMenuNew = new MenuItem( S"新建(&N)", new EventHandler(this, &WinForm::OnFileNew), Shortcut::CtrlN); m_pFileMenuNew->ShowShortcut = true; m_pFileMenuOpen = new MenuItem( S"打开(&O)", new EventHandler(this, &WinForm::OnFileOpen), Shortcut::CtrlO); m_pFileMenuOpen->ShowShortcut = true; m_pFileMenuExit = new MenuItem( S"退出(&X)", new EventHandler(this, &WinForm::OnFileExit)); MenuItem* rItems[] = new MenuItem *[3]; rItems[0] = m_pFileMenuNew; rItems[1] = m_pFileMenuOpen; rItems[2] = m_pFileMenuExit; m_pFileMenu = new MenuItem( S"文件(&F)", rItems); m_pEditMenuCut = new MenuItem( S"剪切(&X)"); m_pEditMenuCut->Shortcut = Shortcut::CtrlX; m_pEditMenuCut->ShowShortcut = true; m_pEditMenuCut->Enabled = false; m_pEditMenuCopy = new MenuItem( S"复制(&C)"); m_pEditMenuCopy->Shortcut = Shortcut::CtrlC; m_pEditMenuCopy->ShowShortcut = true; m_pEditMenuCopy->Enabled = false; m_pEditMenuPaste = new MenuItem( S"粘贴(&V)"); m_pEditMenuPaste->Shortcut = Shortcut::CtrlV; m_pEditMenuPaste->ShowShortcut = true; m_pEditMenuPaste->Enabled = false; rItems[0] = m_pEditMenuCut; rItems[1] = m_pEditMenuCopy; rItems[2] = m_pEditMenuPaste; m_pEditMenu = new MenuItem( S"编辑(&E)", rItems); m_pViewMenuToolBar = new MenuItem( S"工具栏"); m_pViewMenuToolBar->Checked = true; m_pViewMenuStatusBar = new MenuItem( S"状态栏"); m_pViewMenuStatusBar->Checked = true; m_pViewMenu = new MenuItem( S"查看(&V)"); m_pViewMenu->MenuItems->Add(m_pViewMenuToolBar); m_pViewMenu->MenuItems->Add(m_pViewMenuStatusBar); m_pAboutMenu = new MenuItem( S"关于...(&A)"); m_pHelpMenu = new MenuItem( S"帮助(&H)"); m_pHelpMenu->MenuItems->Add(m_pAboutMenu); rItems[0] = m_pFileMenu; rItems[1] = m_pEditMenu; rItems[2] = m_pViewMenu; m_pMenu = new MainMenu(rItems); m_pMenu->MenuItems->Add(m_pHelpMenu); |
...//同上面的代码 MenuItem* cItems[] = new MenuItem *[3]; cItems[0] = m_pFileMenuNew; cItems[1] = m_pFileMenuOpen; cItems[2] = m_pFileMenuExit; Windows::Forms::ContextMenu* pContextMenu = new Windows::Forms::ContextMenu(cItems); ContextMenu = pContextMenu; |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者