IVsExpansionEvents::OnAfterSnippetsKeyBindingChange Method (UInt32, UInt32, Int32)

 

Called when there is a change in the key binding that is associated with inserting code snippets.

Namespace:   Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop.8.0 (in Microsoft.VisualStudio.TextManager.Interop.8.0.dll)

int OnAfterSnippetsKeyBindingChange(
	unsigned int dwCmdGuid,
	unsigned int dwCmdId,
	int fBound
)

Parameters

dwCmdGuid
Type: System::UInt32

[in] The GUID of the command group being bound to.

dwCmdId
Type: System::UInt32

[in] The ID of the command in the command group being bound to.

fBound
Type: System::Int32

[in] Non-zero (TRUE) if the command is being bound; otherwise, zero (FALSE) if the binding is being removed.

Return Value

Type: System::Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

HRESULT OnAfterSnippetsKeyBindingChange(
   DWORD dwCmdGuid,
   DWORD dwCmdId,
   BOOL fBound
);

This method is called when the key binding to the "Invoke Snippet from ShortCut" command is changed (this is an internal command to Visual Studio and not associated with the IntelliSense -> Insert Snippet menu command). Changing this particular key binding is internal to Visual Studio and therefore this event is typically of little interest to outside listeners. However, since it is part of the IVsExpansionEvents interface, it must be implemented but the call can be ignored by the implementer.

This method is called twice for any key binding: the first when the previous command is unbound and the second when the new command is bound.

Return to top
Show: