Support
Joined: 18 Jul 2005 Posts: 731
|
Posted: Thu Mar 20, 2008 3:16 am Post subject: HOWTO : Handle double-clicking of items in the namespace extension |
|
|
When the user double-clicks or presses 'Enter', the GetMenuItemsDefault functionof CNSEFolder is called. The default implement of this function does the following : It adds a menu item with verb "explore" if the selected item is a folder and a menu item with the verb "open" if it is a non-folder. The corresponding OnOpen or OnExplore methods of CNSEFolder are called immediately afterwards. The default implementation of OnExplore attempts to browse to the selected folder. To handle the double-click or pressing of "Enter" key on a non-folder, you must override the OnOpen method.
Note that you can also override the GetMenuItemsDefault function and add your own custom menu item. Make sure that the added menu item is set as the default by calling SetDefaultItem(TRUE). The OnExecuteMenuItem function (or one of the standard OnCopy, OnPaste, etc functions if the added menu item has a standard verb) is called immediately afterwards. |
|