VsTextManagerClass.SetUserPreferences 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
设置用户首选项。
public:
virtual int SetUserPreferences(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) = Microsoft::VisualStudio::TextManager::Interop::IVsTextManager::SetUserPreferences;
virtual int SetUserPreferences(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 virtual int SetUserPreferences (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 SetUserPreferences : Microsoft.VisualStudio.TextManager.Interop.VIEWPREFERENCES[] * Microsoft.VisualStudio.TextManager.Interop.FRAMEPREFERENCES[] * Microsoft.VisualStudio.TextManager.Interop.LANGPREFERENCES[] * Microsoft.VisualStudio.TextManager.Interop.FONTCOLORPREFERENCES[] -> int
override this.SetUserPreferences : Microsoft.VisualStudio.TextManager.Interop.VIEWPREFERENCES[] * Microsoft.VisualStudio.TextManager.Interop.FRAMEPREFERENCES[] * Microsoft.VisualStudio.TextManager.Interop.LANGPREFERENCES[] * Microsoft.VisualStudio.TextManager.Interop.FONTCOLORPREFERENCES[] -> int
Public Overridable Function SetUserPreferences (pViewPrefs As VIEWPREFERENCES(), pFramePrefs As FRAMEPREFERENCES(), pLangPrefs As LANGPREFERENCES(), pColorPrefs As FONTCOLORPREFERENCES()) As Integer
参数
- pViewPrefs
- VIEWPREFERENCES[]
中描述所有编辑器视图的所需默认视图标志的值。 有关详细信息,请参阅 VIEWPREFERENCES。 如果未设置视图首选项,则可以为 null。
- pFramePrefs
- FRAMEPREFERENCES[]
中描述所有编辑器框架所需默认标志的值。 有关详细信息,请参阅 FRAMEPREFERENCES。 如果未设置框架首选项,则可以为 null。
- pLangPrefs
- LANGPREFERENCES[]
中描述结构中所指定语言的所需标志的值。 有关详细信息,请参阅 LANGPREFERENCES。 如果未设置语言首选项,则可以为 null。
- pColorPrefs
- FONTCOLORPREFERENCES[]
中描述所有编辑器视图的颜色和字体首选项的值。 此参数仅供内部编辑器使用。 当外部包调用此方法时,应为 null。 有关详细信息,请参阅 FONTCOLORPREFERENCES。
返回
如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。