Type | Description | |||
Items as String | (By Reference) A String expression that indicates the list of custom commands being added. | |||
Separator as String | (By Reference) A String expression that indicates the separator for the list of commands in the Items parameter. |
private void QueryContextMenu(object sender,ref string Items,ref string Separator) { } Private Sub QueryContextMenu(ByVal sender As System.Object,ByRef Items As String,ByRef Separator As String) Handles QueryContextMenu End Sub |
private void QueryContextMenu(object sender, AxEXSHELLVIEWLib._IExShellViewEvents_QueryContextMenuEvent e) { } void OnQueryContextMenu(LPCTSTR FAR* Items,LPCTSTR FAR* Separator) { } void __fastcall QueryContextMenu(TObject *Sender,BSTR * Items,BSTR * Separator) { } procedure QueryContextMenu(ASender: TObject; var Items : WideString;var Separator : WideString); begin end; procedure QueryContextMenu(sender: System.Object; e: AxEXSHELLVIEWLib._IExShellViewEvents_QueryContextMenuEvent); begin end; begin event QueryContextMenu(string Items,string Separator) end event QueryContextMenu Private Sub QueryContextMenu(ByVal sender As System.Object, ByVal e As AxEXSHELLVIEWLib._IExShellViewEvents_QueryContextMenuEvent) Handles QueryContextMenu End Sub Private Sub QueryContextMenu(Items As String,Separator As String) End Sub Private Sub QueryContextMenu(Items As String,Separator As String) End Sub LPARAMETERS Items,Separator PROCEDURE OnQueryContextMenu(oExShellView,Items,Separator) RETURN |
<SCRIPT EVENT="QueryContextMenu(Items,Separator)" LANGUAGE="JScript"> </SCRIPT> <SCRIPT LANGUAGE="VBScript"> Function QueryContextMenu(Items,Separator) End Function </SCRIPT> Procedure OnComQueryContextMenu String llItems String llSeparator Forward Send OnComQueryContextMenu llItems llSeparator End_Procedure METHOD OCX_QueryContextMenu(Items,Separator) CLASS MainDialog RETURN NIL void onEvent_QueryContextMenu(COMVariant /*string*/ _Items,COMVariant /*string*/ _Separator) { } function QueryContextMenu as v (Items as C,Separator as C) end function function nativeObject_QueryContextMenu(Items,Separator) return |
For instance the following VB sample adds 3 more items in the control's default context menu:
Private Sub ExShellView1_QueryContextMenu(Items As String, Separator As String) Separator = "," Items = ",First,Second,Third" End Sub
and so the control's context menu shows three more items as in the following screen shot:
and if the DefaultMenuItems property is set on False, the context menu shows only the new three items:
The first separator item in the context menu is not shown because we have used Items = "First,Second,Third" instead Items = ",First,Second,Third"