IVsFontAndColorUtilities Interface
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in microsoft.visualstudio.shell.interop.8.0.dll)
The methods of the IVsFontAndColorUtilities interface allow a VSPackage to provide Font and Color support tools for working with FontInfo, __FONTCOLORFLAGS, __FCFONTFLAGS, and LOGFONTW, which are used to specify and modify font and color information.
If a VSPackage providing Fonts and Colors changes its default settings, it must call ClearCache or ClearAllCaches. This will force the reloading of Fonts and Colors providers, ensure the propagation of its settings and the currency of future Fonts and Colors queries.
Note |
|---|
| Many of the methods in this interface work with color data stored as a COLORREF, consistent with the Windows 32 SDK GetSysColor function. A COLORREF (RGB) has the hex format of 0x00bbggrr. Managed code can obtain functionality equivalent to GetSysColor with SystemColors and convert between COLORREF and the System.Drawing.Color structure using M:System.Drawing.ColorTranslator.FromWin32 and M:System.Drawing.ColorTranslator.ToWin32. |
IVsFontAndColorUtilities store=null;
store=GetService(typeof(SVsFontAndColorStorage)) as IVsFontAndColorUtilities;
if (store == null ){
throw new ApplicationException("Unable to obtain IVsFontAndColorUtilities Interface");
CComPtr<IVsFontAndColorUtilities> srpFCCacheMgr;
pSP->QueryService(SID_SVsFontAndColorStorage , IID_IVsFontAndColorUtilities , (void**)&srpFCCacheMgr);
VSASSERT(SUCCEEDED(hr), " IVsFontAndColorUtilities not provided");
Reference
IVsFontAndColorUtilities MembersMicrosoft.VisualStudio.Shell.Interop Namespace
Note