本文整理汇总了C++中ContextMenu::create方法的典型用法代码示例。如果您正苦于以下问题:C++ ContextMenu::create方法的具体用法?C++ ContextMenu::create怎么用?C++ ContextMenu::create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ContextMenu
的用法示例。
在下文中一共展示了ContextMenu::create方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MainWindow
MainWindow :: MainWindow(HINSTANCE instance, const wchar_t* caption, _Controller* controller, Model* model)
: SDIWindow(instance, caption), _windowList(10, IDM_WINDOW_WINDOWS), _recentFiles(10, IDM_FILE_FILES), _recentProjects(10, IDM_FILE_PROJECTS), _contextBrowser(model)
{
_controller = controller;
_model = model;
_tabTTHandle = NULL;
_controlCount = 14;
_controls = (_BaseControl**)malloc(_controlCount << 2);
_controls[0] = NULL;
_controls[CTRL_MENU] = new Menu(instance, IDR_IDE_ACCELERATORS, ::GetMenu(getHandle()));
_controls[CTRL_CONTEXTMENU] = new ContextMenu();
_windowList.assign((Menu*)_controls[CTRL_MENU]);
_recentFiles.assign((Menu*)_controls[CTRL_MENU]);
_recentProjects.assign((Menu*)_controls[CTRL_MENU]);
ContextMenu* contextMenu = (ContextMenu*)_controls[CTRL_CONTEXTMENU];
contextMenu->create(8, contextMenuInfo);
_controls[CTRL_STATUSBAR] = new StatusBar(this, 5, StatusBarWidths);
_controls[CTRL_TOOLBAR] = new ToolBar(this, 16, AppToolBarButtonNumber, AppToolBarButtons);
_controls[CTRL_EDITFRAME] = new EditFrame(this, true, contextMenu, model);
_controls[CTRL_TABBAR] = new TabBar(this, _model->tabWithAboveScore);
_controls[CTRL_OUTPUT] = new Output((Control*)_controls[CTRL_TABBAR], this);
_controls[CTRL_MESSAGELIST] = new MessageLog((Control*)_controls[CTRL_TABBAR]);
_controls[CTRL_CALLLIST] = new CallStackLog((Control*)_controls[CTRL_TABBAR]);
_controls[CTRL_BSPLITTER] = new Splitter(this, (Control*)_controls[CTRL_TABBAR], false, IDM_LAYOUT_CHANGED);
_controls[CTRL_CONTEXTBOWSER] = new TreeView((Control*)_controls[CTRL_TABBAR], true);
_controls[CTRL_PROJECTVIEW] = new TreeView(this, false);
_controls[CTRL_HSPLITTER] = new Splitter(this, (Control*)_controls[CTRL_PROJECTVIEW], true, IDM_LAYOUT_CHANGED);
((Control*)_controls[CTRL_TABBAR])->_setHeight(120);
((Control*)_controls[CTRL_BSPLITTER])->_setConstraint(60, 100);
((Control*)_controls[CTRL_PROJECTVIEW])->_setWidth(200);
_statusBar = (StatusBar*)_controls[CTRL_STATUSBAR];
EditFrame* frame = (EditFrame*)_controls[CTRL_EDITFRAME];
TextView* textView = new TextView(frame, 5, 28, 400, 400);
frame->populate(textView);
textView->setReceptor(this);
_contextBrowser.assign((Control*)_controls[CTRL_CONTEXTBOWSER]);
setLeft(CTRL_HSPLITTER);
setTop(CTRL_TOOLBAR);
setClient(CTRL_EDITFRAME);
setBottom(CTRL_BSPLITTER);
frame->init(model);
showControls(CTRL_STATUSBAR, CTRL_EDITFRAME);
showControls(CTRL_PROJECTVIEW, CTRL_PROJECTVIEW);
}