IVsTextManager.GetUserPreferences Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the user preferences, such as tab usage, indent size and widget margin presence for the view, frame, and language service.
public:
int GetUserPreferences(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);
int GetUserPreferences(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 int GetUserPreferences (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 GetUserPreferences : Microsoft.VisualStudio.TextManager.Interop.VIEWPREFERENCES[] * Microsoft.VisualStudio.TextManager.Interop.FRAMEPREFERENCES[] * Microsoft.VisualStudio.TextManager.Interop.LANGPREFERENCES[] * Microsoft.VisualStudio.TextManager.Interop.FONTCOLORPREFERENCES[] -> int
Public Function GetUserPreferences (pViewPrefs As VIEWPREFERENCES(), pFramePrefs As FRAMEPREFERENCES(), pLangPrefs As LANGPREFERENCES(), pColorPrefs As FONTCOLORPREFERENCES()) As Integer
Parameters
- pViewPrefs
- VIEWPREFERENCES[]
[out] Pointer to the view preferences. For more information about pViewPrefs
, see VIEWPREFERENCES.
- pFramePrefs
- FRAMEPREFERENCES[]
[out] Pointer to the frame preferences. For more information about pFramePrefs
, see FRAMEPREFERENCES.
- pLangPrefs
- LANGPREFERENCES[]
[in, out] Pointer to the language preferences. For more information about pLangPrefs
, see LANGPREFERENCES.
- pColorPrefs
- FONTCOLORPREFERENCES[]
[in, out] Pointer to the font color preferences.
Returns
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From textmgr.idl:
HRESULT IVsTextManager::GetUserPreferences(
[out] VIEWPREFERENCES * pViewPrefs,
[out] FRAMEPREFERENCES * pFramePrefs,
[in, out] LANGPREFERENCES * pLangPrefs,
[in, out] FONTCOLORPREFERENCES * pColorPrefs
);
Use this method to determine view, frame, language, font, and color preferences. Pass in the GUID for the appropriate item and the method returns the filled structure for those preferences. You are not required to pass in a GUID for each structure if you only want preferences for one item (for example, you only want view preferences). Pass in null
for the structures that you do not want to fill.