Condividi tramite


IVsExpansionEvents.OnAfterSnippetsKeyBindingChange Method

Definition

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

public:
 int OnAfterSnippetsKeyBindingChange(System::UInt32 dwCmdGuid, System::UInt32 dwCmdId, int fBound);
public:
 int OnAfterSnippetsKeyBindingChange(unsigned int dwCmdGuid, unsigned int dwCmdId, int fBound);
int OnAfterSnippetsKeyBindingChange(unsigned int dwCmdGuid, unsigned int dwCmdId, int fBound);
public int OnAfterSnippetsKeyBindingChange (uint dwCmdGuid, uint dwCmdId, int fBound);
abstract member OnAfterSnippetsKeyBindingChange : uint32 * uint32 * int -> int
Public Function OnAfterSnippetsKeyBindingChange (dwCmdGuid As UInteger, dwCmdId As UInteger, fBound As Integer) As Integer

Parameters

dwCmdGuid
UInt32

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

dwCmdId
UInt32

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

fBound
Int32

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

Returns

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

Remarks

COM Signature

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.

Applies to