Support
Joined: 18 Jul 2005 Posts: 731
|
Posted: Wed Jun 18, 2008 11:07 am Post subject: HOWTO : Display a different context menu than the default system context menu. |
|
|
To display your own context menu instead of the default system context menu, use the OnContextMenuPopup event as follows :
[VB6]
Private Sub fldrVw_OnContextMenuPopup(ByVal ShellMenu As FolderViewControl.IShellContextMenu, Cancel As Boolean)
' This prevents FolderView from displaying its own context menu
Cancel = True
' Show your own menu instead
contextMenu.Show()
End Sub
[C++]
void CFdrViewVCDlg::OnOnContextMenuPopupFolderviewctrl1(LPDISPATCH ShellMenu, BOOL FAR* Cancel)
{
// This prevents FolderView from displaying its own context menu
*Cancel = TRUE ;
// Show your own menu instead
contextMenu.Show();
} |
|