Support
Joined: 18 Jul 2005 Posts: 731
|
Posted: Wed Jun 18, 2008 10:09 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 fileVw_OnContextMenuPopup(ByVal ShellMenu As FileViewControl.IShellContextMenu, ByVal BackgroundMenu As Boolean, Cancel As Boolean)
' BackgroundMenu can be used to determine whether context menu is for item or background.
' This prevents FileView from displaying its own context menu
Cancel = True
' Show your own menu instead
contextMenu.Show()
End Sub
[C++]
void CFilViewVCDlg::OnOnContextMenuPopupFileviewctrl1(LPDISPATCH ShellMenu, BOOL BackgroundMenu, BOOL FAR* Cancel)
{
// BackgroundMenu can be used to determine whether context menu is for item or background.
// This prevents FileView from displaying its own context menu
*Cancel = TRUE ;
// Show your own menu instead
contextMenu.Show();
} |
|