IVsTextManager2.SetUserPreferences2 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
设置用户首选项。
public:
int SetUserPreferences2(cli::array <Microsoft::VisualStudio::TextManager::Interop::VIEWPREFERENCES2> ^ pViewPrefs, cli::array <Microsoft::VisualStudio::TextManager::Interop::FRAMEPREFERENCES2> ^ pFramePrefs, cli::array <Microsoft::VisualStudio::TextManager::Interop::LANGPREFERENCES2> ^ pLangPrefs, cli::array <Microsoft::VisualStudio::TextManager::Interop::FONTCOLORPREFERENCES2> ^ pColorPrefs);
int SetUserPreferences2(std::Array <Microsoft::VisualStudio::TextManager::Interop::VIEWPREFERENCES2> const & pViewPrefs, std::Array <Microsoft::VisualStudio::TextManager::Interop::FRAMEPREFERENCES2> const & pFramePrefs, std::Array <Microsoft::VisualStudio::TextManager::Interop::LANGPREFERENCES2> const & pLangPrefs, std::Array <Microsoft::VisualStudio::TextManager::Interop::FONTCOLORPREFERENCES2> const & pColorPrefs);
public int SetUserPreferences2 (Microsoft.VisualStudio.TextManager.Interop.VIEWPREFERENCES2[] pViewPrefs, Microsoft.VisualStudio.TextManager.Interop.FRAMEPREFERENCES2[] pFramePrefs, Microsoft.VisualStudio.TextManager.Interop.LANGPREFERENCES2[] pLangPrefs, Microsoft.VisualStudio.TextManager.Interop.FONTCOLORPREFERENCES2[] pColorPrefs);
abstract member SetUserPreferences2 : Microsoft.VisualStudio.TextManager.Interop.VIEWPREFERENCES2[] * Microsoft.VisualStudio.TextManager.Interop.FRAMEPREFERENCES2[] * Microsoft.VisualStudio.TextManager.Interop.LANGPREFERENCES2[] * Microsoft.VisualStudio.TextManager.Interop.FONTCOLORPREFERENCES2[] -> int
Public Function SetUserPreferences2 (pViewPrefs As VIEWPREFERENCES2(), pFramePrefs As FRAMEPREFERENCES2(), pLangPrefs As LANGPREFERENCES2(), pColorPrefs As FONTCOLORPREFERENCES2()) As Integer
参数
- pViewPrefs
- VIEWPREFERENCES2[]
中描述所有编辑器视图的所需默认视图标志的值。 有关详细信息,请参阅 VIEWPREFERENCES2。 如果未设置视图首选项,则可以为 null。
- pFramePrefs
- FRAMEPREFERENCES2[]
中描述所有编辑器框架所需默认标志的值。 有关详细信息,请参阅 FRAMEPREFERENCES2。 如果未设置框架首选项,则可以为 null。
- pLangPrefs
- LANGPREFERENCES2[]
中描述结构中所指定语言的所需标志的值。 有关详细信息,请参阅 LANGPREFERENCES2。 如果未设置语言首选项,则可以为 null。
- pColorPrefs
- FONTCOLORPREFERENCES2[]
中描述所有编辑器视图的颜色和字体首选项的值。 此参数仅供内部编辑器使用。 当外部包调用此方法时,应为 null。 有关详细信息,请参阅 FONTCOLORPREFERENCES2。
返回
如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。
注解
COM 签名
从 textmgr:
HRESULT IVsTextManager2::SetUserPreferences2(
[in] const VIEWPREFERENCES2 * pViewPrefs,
[in] const FRAMEPREFERENCES2 * pFramePrefs,
[in] const LANGPREFERENCES2 * pLangPrefs,
[in] const FONTCOLORPREFERENCES2 * pColorPrefs
);