다음을 통해 공유


IVsTextManagerEvents.OnUserPreferencesChanged Method

Definition

Fires when the user's global preferences are changed.

public:
 void OnUserPreferencesChanged(cli::array <Microsoft::VisualStudio::TextManager::Interop::VIEWPREFERENCES> ^ pViewPrefs, cli::array <Microsoft::VisualStudio::TextManager::Interop::FRAMEPREFERENCES> ^ pFramePrefs, cli::array <Microsoft::VisualStudio::TextManager::Interop::LANGPREFERENCES> ^ pLangPrefs, cli::array <Microsoft::VisualStudio::TextManager::Interop::FONTCOLORPREFERENCES> ^ pColorPrefs);
void OnUserPreferencesChanged(std::Array <Microsoft::VisualStudio::TextManager::Interop::VIEWPREFERENCES> const & pViewPrefs, std::Array <Microsoft::VisualStudio::TextManager::Interop::FRAMEPREFERENCES> const & pFramePrefs, std::Array <Microsoft::VisualStudio::TextManager::Interop::LANGPREFERENCES> const & pLangPrefs, std::Array <Microsoft::VisualStudio::TextManager::Interop::FONTCOLORPREFERENCES> const & pColorPrefs);
public void OnUserPreferencesChanged (Microsoft.VisualStudio.TextManager.Interop.VIEWPREFERENCES[] pViewPrefs, Microsoft.VisualStudio.TextManager.Interop.FRAMEPREFERENCES[] pFramePrefs, Microsoft.VisualStudio.TextManager.Interop.LANGPREFERENCES[] pLangPrefs, Microsoft.VisualStudio.TextManager.Interop.FONTCOLORPREFERENCES[] pColorPrefs);
abstract member OnUserPreferencesChanged : Microsoft.VisualStudio.TextManager.Interop.VIEWPREFERENCES[] * Microsoft.VisualStudio.TextManager.Interop.FRAMEPREFERENCES[] * Microsoft.VisualStudio.TextManager.Interop.LANGPREFERENCES[] * Microsoft.VisualStudio.TextManager.Interop.FONTCOLORPREFERENCES[] -> unit
Public Sub OnUserPreferencesChanged (pViewPrefs As VIEWPREFERENCES(), pFramePrefs As FRAMEPREFERENCES(), pLangPrefs As LANGPREFERENCES(), pColorPrefs As FONTCOLORPREFERENCES())

Parameters

pViewPrefs
VIEWPREFERENCES[]

[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
FRAMEPREFERENCES[]

[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
LANGPREFERENCES[]

[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
FONTCOLORPREFERENCES[]

[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.

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsTextManagerEvents::OnUserPreferencesChanged(  
   [in] const VIEWPREFERENCES * pViewPrefs,  
   [in] const FRAMEPREFERENCES * pFramePrefs,  
   [in] const LANGPREFERENCES * pLangPrefs,  
   [in] const FONTCOLORPREFERENCES * 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.

Applies to