IVsTextManagerEvents2::OnUserPreferencesChanged2 Method (array<VIEWPREFERENCES2>^, array<FRAMEPREFERENCES2>^, array<LANGPREFERENCES2>^, array<FONTCOLORPREFERENCES2>^)

 

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)

int OnUserPreferencesChanged2(
	array<VIEWPREFERENCES2>^ pViewPrefs,
	array<FRAMEPREFERENCES2>^ pFramePrefs,
	array<LANGPREFERENCES2>^ pLangPrefs,
	array<FONTCOLORPREFERENCES2>^ pColorPrefs
)

Parameters

pViewPrefs
Type: array<Microsoft.VisualStudio.TextManager.Interop::VIEWPREFERENCES2>^

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

pFramePrefs
Type: array<Microsoft.VisualStudio.TextManager.Interop::FRAMEPREFERENCES2>^

[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: array<Microsoft.VisualStudio.TextManager.Interop::LANGPREFERENCES2>^

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

pColorPrefs
Type: array<Microsoft.VisualStudio.TextManager.Interop::FONTCOLORPREFERENCES2>^

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

Return Value

Type: System::Int32

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

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.

Return to top
Show: