Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Fabio Ermotti
|
Jan 22, 2007 - 4:02 AM
|
Is there any way to have the "Built-in Menus" item in the Command folder of Customize dialog (such as MS Office applications) ? The DrawCli sample application doesn’t show that item.
|
|
Technical Support
|
Jan 22, 2007 - 11:31 AM
|
You can manually add the Built-in Menus command category and initialize its command tree from the menu bar’s command tree. You should invoke the following code from the CExtCustomizeSite -derived (typically the main frame) class after the menu lines were initialized: CCmdMenuInfo * pCmdMenuInfo = MenuInfoGetByName( _T("Document") );
ASSERT( pCmdMenuInfo != NULL );
CExtCustomizeCmdTreeNode * pNodeMenu = pCmdMenuInfo->GetNode( true );
ASSERT( pNodeMenu );
CCategoryCustomizeInfo * pCategoryInfo =
new CCategoryCustomizeInfo( _T("Built-in Menus"), this );
m_listCategories.AddTail( pCategoryInfo );
pCat->m_pRoot->InsertClonedChildsNodesFrom( this, pNodeMenu );
|
|