Sky Software Homepage LogicNP Software Knowledge Base And FAQ

 
Contact Product Support    SearchSearch      Subscribe to the RSS feed for this forum

HOWTO : Add sub-menus/multi-level menus to a context menu extension developed using EZShellExtensionsMFC

 
Subscribe to the RSS feed for this forum  Forum Index -> EZShellExtensionsMFC
View previous topic :: View next topic  
Author Message
Support



Joined: 18 Jul 2005
Posts: 731

Posted: Mon Dec 10, 2007 8:15 am    Post subject: HOWTO : Add sub-menus/multi-level menus to a context menu extension developed using EZShellExtensionsMFC

To add multi-level menu entries in a context menu extension, you should use the SetHasSubMenu method of CShellMenuItem. Use the following code in the OnGetMenuItems method override of your CContextMenuExtension derived class :

CShellMenuItem* parent = e.menu->AddItem(_T("Parent menu item"));
parent->SetHasSubMenu(true);

parent->GetSubMenu()->AddItem(_T("Menu item 1"),_T("menuitem1"),_T("Menu Item 1"));
parent->GetSubMenu()->AddItem(_T("Menu item 2"),_T("menuitem2"),_T("Menu Item 2"));
Back to top
Display posts from previous:   
Forum Index -> EZShellExtensionsMFC All times are GMT
Page 1 of 1

 
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group