IVsTextManagerEvents2.OnUserPreferencesChanged2 Method

Fired when the user's global preferences are changed.

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

Syntax

'宣言
Function OnUserPreferencesChanged2 ( _
    pViewPrefs As VIEWPREFERENCES2(), _
    pFramePrefs As FRAMEPREFERENCES2(), _
    pLangPrefs As LANGPREFERENCES2(), _
    pColorPrefs As FONTCOLORPREFERENCES2() _
) As Integer
'使用
Dim instance As IVsTextManagerEvents2
Dim pViewPrefs As VIEWPREFERENCES2()
Dim pFramePrefs As FRAMEPREFERENCES2()
Dim pLangPrefs As LANGPREFERENCES2()
Dim pColorPrefs As FONTCOLORPREFERENCES2()
Dim returnValue As Integer

returnValue = instance.OnUserPreferencesChanged2(pViewPrefs, _
    pFramePrefs, pLangPrefs, pColorPrefs)
int OnUserPreferencesChanged2(
    VIEWPREFERENCES2[] pViewPrefs,
    FRAMEPREFERENCES2[] pFramePrefs,
    LANGPREFERENCES2[] pLangPrefs,
    FONTCOLORPREFERENCES2[] pColorPrefs
)
int OnUserPreferencesChanged2(
    [InAttribute] array<VIEWPREFERENCES2>^ pViewPrefs, 
    [InAttribute] array<FRAMEPREFERENCES2>^ pFramePrefs, 
    [InAttribute] array<LANGPREFERENCES2>^ pLangPrefs, 
    [InAttribute] array<FONTCOLORPREFERENCES2>^ pColorPrefs
)
function OnUserPreferencesChanged2(
    pViewPrefs : VIEWPREFERENCES2[], 
    pFramePrefs : FRAMEPREFERENCES2[], 
    pLangPrefs : LANGPREFERENCES2[], 
    pColorPrefs : FONTCOLORPREFERENCES2[]
) : int

Parameters

  • pViewPrefs
    Type: []

    [in] Pointer to the VIEWPREFERENCES structure. This structure provides the current settings for the view. If this is non-a null reference (Nothing in Visual Basic), preferences that specifically affect text view behavior have changed.

  • pFramePrefs
    Type: []

    [in] Pointer to the FRAMEPREFERENCES structure, which allows the frame to control whether the view shows horizontal or vertical scroll bars. If this is non-NULL, preferences that specifically affect code windows have changed.

  • pLangPrefs
    Type: []

    [in] Pointer to the relevant language as specified by the szFileType and guidLang members of the LANGPREFERENCES structure. If this is non-a null reference (Nothing in Visual Basic), preferences that affect a specific language's common settings have changed.

  • pColorPrefs
    Type: []

    [in] Specifies color preferences. If non-a null reference (Nothing in Visual Basic), the pguidColorService member of the FONTCOLORPREFERENCES structure indicates which colorable item provider is associated with the pColorTable member. If this is non-a null reference (Nothing in Visual Basic), preferences that affect the colors or font used by a text view have changed.

Return Value

Type: System.Int32

Remarks

COM Signature

From textmgr2.idl:

void IVsTextManagerEvents2::OnUserPreferencesChanged2(
   [in] const VIEWPREFERENCES2 * pViewPrefs,
   [in] const FRAMEPREFERENCES2 * pFramePrefs,
   [in] const LANGPREFERENCES2 * pLangPrefs,
   [in] const FONTCOLORPREFERENCES2 * pColorPrefs
);

Use this method to modify your application in response to changes in user preferences. When the user changes global preferences, either due to changing settings from the Options command in the Tools menu or due to invoking a command, such as hitting the Insert key, this event is fired.

Permissions

See Also

Reference

IVsTextManagerEvents2 Interface

IVsTextManagerEvents2 Members

Microsoft.VisualStudio.TextManager.Interop Namespace