|
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------
#pragma warning disable CS1591,CS1573,CS0465,CS0649,CS8019,CS1570,CS1584,CS1658,CS0436,CS8981
using global::System;
using global::System.Diagnostics;
using global::System.Diagnostics.CodeAnalysis;
using global::System.Runtime.CompilerServices;
using global::System.Runtime.InteropServices;
using global::System.Runtime.Versioning;
using winmdroot = global::Windows.Win32;
namespace Windows.Win32
{
/// <content>
/// Contains extern methods from "UXTHEME.dll".
/// </content>
internal static partial class PInvoke
{
/// <summary>Closes the theme data handle.</summary>
/// <param name="hTheme">
/// <para>Type: <b>HTHEME</b> Handle to a window's specified theme data. Use <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-openthemedata">OpenThemeData</a> to create an <b>HTHEME</b>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-closethemedata#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>The <b>CloseThemeData</b> function should be called when a window that has a visual style applied is destroyed. This function should also be called whenever a window receives a <a href="https://docs.microsoft.com/windows/desktop/winmsg/wm-themechanged">WM_THEMECHANGED</a> message. This call should be followed by an attempt to create a new theme data handle if a call to the <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-isthemeactive">IsThemeActive</a> function returns <b>TRUE</b>.</remarks>
[DllImport("UXTHEME.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[SupportedOSPlatform("windows6.0.6000")]
internal static extern winmdroot.Foundation.HRESULT CloseThemeData(winmdroot.UI.Controls.HTHEME hTheme);
/// <inheritdoc cref="DrawThemeBackground(winmdroot.UI.Controls.HTHEME, winmdroot.Graphics.Gdi.HDC, int, int, winmdroot.Foundation.RECT*, winmdroot.Foundation.RECT*)"/>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT DrawThemeBackground(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, in winmdroot.Foundation.RECT pRect, winmdroot.Foundation.RECT? pClipRect)
{
fixed (winmdroot.Foundation.RECT* pRectLocal = &pRect)
{
winmdroot.Foundation.RECT pClipRectLocal = pClipRect ?? default(winmdroot.Foundation.RECT);
winmdroot.Foundation.HRESULT __result = PInvoke.DrawThemeBackground(hTheme, hdc, iPartId, iStateId, pRectLocal, pClipRect.HasValue ? &pClipRectLocal : null);
return __result;
}
}
/// <summary>Draws the border and fill defined by the visual style for the specified control part.</summary>
/// <param name="hTheme">
/// <para>Type: <b>HTHEME</b> Handle to a window's specified theme data. Use <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-openthemedata">OpenThemeData</a> to create an HTHEME.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemebackground#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="hdc">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HDC</a></b> HDC used for drawing the theme-defined background image.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemebackground#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPartId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the part to draw. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemebackground#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iStateId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the state of the part to draw. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemebackground#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pRect">
/// <para>Type: <b>const <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a>*</b> Pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a> structure that contains the rectangle, in logical coordinates, in which the background image is drawn.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemebackground#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pClipRect">
/// <para>Type: <b>const <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a>*</b> Pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a> structure that contains a clipping rectangle. This parameter may be set to <b>NULL</b>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemebackground#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>Drawing operations are scaled to fit and not exceed the rectangle specified in <i>pRect</i>. Your application should not draw outside the rectangle specified by <i>pClipRect</i>.</remarks>
[DllImport("UXTHEME.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[SupportedOSPlatform("windows6.0.6000")]
internal static extern unsafe winmdroot.Foundation.HRESULT DrawThemeBackground(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.Foundation.RECT* pRect, [Optional] winmdroot.Foundation.RECT* pClipRect);
/// <inheritdoc cref="DrawThemeEdge(winmdroot.UI.Controls.HTHEME, winmdroot.Graphics.Gdi.HDC, int, int, winmdroot.Foundation.RECT*, winmdroot.Graphics.Gdi.DRAWEDGE_FLAGS, winmdroot.Graphics.Gdi.DRAW_EDGE_FLAGS, winmdroot.Foundation.RECT*)"/>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT DrawThemeEdge(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, in winmdroot.Foundation.RECT pDestRect, winmdroot.Graphics.Gdi.DRAWEDGE_FLAGS uEdge, winmdroot.Graphics.Gdi.DRAW_EDGE_FLAGS uFlags, winmdroot.Foundation.RECT* pContentRect)
{
fixed (winmdroot.Foundation.RECT* pDestRectLocal = &pDestRect)
{
winmdroot.Foundation.HRESULT __result = PInvoke.DrawThemeEdge(hTheme, hdc, iPartId, iStateId, pDestRectLocal, uEdge, uFlags, pContentRect);
return __result;
}
}
/// <summary>Draws one or more edges defined by the visual style of a rectangle.</summary>
/// <param name="hTheme">
/// <para>Type: <b>HTHEME</b> Handle to a window's specified theme data. Use <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-openthemedata">OpenThemeData</a> to create an HTHEME.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemeedge#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="hdc">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HDC</a></b> HDC.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemeedge#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPartId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the part that contains the rectangle. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemeedge#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iStateId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the state of the part. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemeedge#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pDestRect">
/// <para>Type: <b>LPCRECT</b> Pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a> structure that contains, in logical coordinates, the rectangle.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemeedge#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="uEdge">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">UINT</a></b> <b>UINT</b> that specifies the type of inner and outer edges to draw. This parameter must be a combination of one inner-border flag and one outer-border flag, or one of the combination flags. The border flags are: </para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemeedge#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="uFlags">Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">UINT</a></b></param>
/// <param name="pContentRect">
/// <para>Type: <b>LPRECT</b> Pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a> structure that contains, in logical coordinates, the rectangle that receives the interior rectangle, if <i>uFlags</i> is set to BF_ADJUST. This parameter may be set to <b>NULL</b>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemeedge#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemeedge">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
[DllImport("UxTheme.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[SupportedOSPlatform("windows6.0.6000")]
internal static extern unsafe winmdroot.Foundation.HRESULT DrawThemeEdge(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.Foundation.RECT* pDestRect, winmdroot.Graphics.Gdi.DRAWEDGE_FLAGS uEdge, winmdroot.Graphics.Gdi.DRAW_EDGE_FLAGS uFlags, [Optional] winmdroot.Foundation.RECT* pContentRect);
/// <inheritdoc cref="DrawThemeParentBackground(winmdroot.Foundation.HWND, winmdroot.Graphics.Gdi.HDC, winmdroot.Foundation.RECT*)"/>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT DrawThemeParentBackground(winmdroot.Foundation.HWND hwnd, winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.RECT? prc)
{
winmdroot.Foundation.RECT prcLocal = prc ?? default(winmdroot.Foundation.RECT);
winmdroot.Foundation.HRESULT __result = PInvoke.DrawThemeParentBackground(hwnd, hdc, prc.HasValue ? &prcLocal : null);
return __result;
}
/// <summary>Draws the part of a parent control that is covered by a partially-transparent or alpha-blended child control.</summary>
/// <param name="hwnd">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HWND</a></b> The child control.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemeparentbackground#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="hdc">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HDC</a></b> The child control's DC.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemeparentbackground#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="prc">
/// <para>Type: <b>const <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a>*</b> The area to be drawn. The rectangle is in the child window's coordinates. If this parameter is NULL, the area to be drawn includes the entire area occupied by the child control.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemeparentbackground#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemeparentbackground">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
[DllImport("UXTHEME.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[SupportedOSPlatform("windows6.0.6000")]
internal static extern unsafe winmdroot.Foundation.HRESULT DrawThemeParentBackground(winmdroot.Foundation.HWND hwnd, winmdroot.Graphics.Gdi.HDC hdc, [Optional] winmdroot.Foundation.RECT* prc);
/// <inheritdoc cref="DrawThemeText(winmdroot.UI.Controls.HTHEME, winmdroot.Graphics.Gdi.HDC, int, int, winmdroot.Foundation.PCWSTR, int, winmdroot.Graphics.Gdi.DRAW_TEXT_FORMAT, uint, winmdroot.Foundation.RECT*)"/>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT DrawThemeText(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, string pszText, int cchText, winmdroot.Graphics.Gdi.DRAW_TEXT_FORMAT dwTextFlags, uint dwTextFlags2, in winmdroot.Foundation.RECT pRect)
{
fixed (winmdroot.Foundation.RECT* pRectLocal = &pRect)
{
fixed (char* pszTextLocal = pszText)
{
winmdroot.Foundation.HRESULT __result = PInvoke.DrawThemeText(hTheme, hdc, iPartId, iStateId, pszTextLocal, cchText, dwTextFlags, dwTextFlags2, pRectLocal);
return __result;
}
}
}
/// <summary>Draws text using the color and font defined by the visual style.</summary>
/// <param name="hTheme">
/// <para>Type: <b>HTHEME</b> Handle to a window's theme data. Use <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-openthemedata">OpenThemeData</a> to create an HTHEME.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemetext#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="hdc">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HDC</a></b> HDC to use for drawing.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemetext#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPartId">
/// <para>Type: <b>int</b> The control part that has the desired text appearance. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>. If this value is 0, the text is drawn in the default font, or a font selected into the device context.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemetext#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iStateId">
/// <para>Type: <b>int</b> The control state that has the desired text appearance. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemetext#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pszText">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">LPCWSTR</a></b> Pointer to a string that contains the text to draw.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemetext#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="cchText">
/// <para>Type: <b>int</b> Value of type <b>int</b> that contains the number of characters to draw. If the parameter is set to -1, all the characters in the string are drawn.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemetext#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="dwTextFlags">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">DWORD</a></b> <b>DWORD</b> that contains one or more values that specify the string's formatting. See <a href="https://docs.microsoft.com/windows/desktop/Controls/theme-format-values">Format Values</a> for possible parameter values. <div class="alert"><b>Note</b> DrawThemeText does not support DT_CALCRECT. However, <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-drawthemetextex">DrawThemeTextEx</a> does support DT_CALCRECT.</div> <div> </div></para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemetext#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="dwTextFlags2">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">DWORD</a></b> Not used. Set to zero.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemetext#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pRect">
/// <para>Type: <b>LPCRECT</b> Pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a> structure that contains the rectangle, in logical coordinates, in which the text is to be drawn. It is recommended to use <b>pExtentRect</b> from <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-getthemetextextent">GetThemeTextExtent</a> to retrieve the correct coordinates.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemetext#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>The function always uses the themed font for the specified part and state if one is defined. Otherwise it uses the font currently selected into the device context. To find out if a themed font is defined, you can call <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-getthemefont">GetThemeFont</a> or <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-getthemepropertyorigin">GetThemePropertyOrigin</a> with TMT_FONT as the property identifier.</remarks>
[DllImport("UxTheme.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[SupportedOSPlatform("windows6.0.6000")]
internal static extern unsafe winmdroot.Foundation.HRESULT DrawThemeText(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.Foundation.PCWSTR pszText, int cchText, winmdroot.Graphics.Gdi.DRAW_TEXT_FORMAT dwTextFlags, uint dwTextFlags2, winmdroot.Foundation.RECT* pRect);
/// <summary>Retrieves the name of the current visual style, and optionally retrieves the color scheme name and size name.</summary>
/// <param name="pszThemeFileName">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">LPWSTR</a></b> Pointer to a string that receives the theme path and file name.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getcurrentthemename#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="cchMaxNameChars">
/// <para>Type: <b>int</b> Value of type <b>int</b> that contains the maximum number of characters allowed in the theme file name.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getcurrentthemename#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pszColorBuff">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">LPWSTR</a></b> Pointer to a string that receives the color scheme name. This parameter may be set to <b>NULL</b>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getcurrentthemename#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="cchMaxColorChars">
/// <para>Type: <b>int</b> Value of type <b>int</b> that contains the maximum number of characters allowed in the color scheme name.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getcurrentthemename#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pszSizeBuff">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">LPWSTR</a></b> Pointer to a string that receives the size name. This parameter may be set to <b>NULL</b>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getcurrentthemename#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="cchMaxSizeChars">
/// <para>Type: <b>int</b> Value of type <b>int</b> that contains the maximum number of characters allowed in the size name.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getcurrentthemename#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> Returns S_OK if successful, otherwise an error code.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getcurrentthemename">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
[DllImport("UXTHEME.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[SupportedOSPlatform("windows6.0.6000")]
internal static extern winmdroot.Foundation.HRESULT GetCurrentThemeName(winmdroot.Foundation.PWSTR pszThemeFileName, int cchMaxNameChars, winmdroot.Foundation.PWSTR pszColorBuff, int cchMaxColorChars, winmdroot.Foundation.PWSTR pszSizeBuff, int cchMaxSizeChars);
/// <summary>Retrieves the property flags that control how visual styles are applied in the current application.</summary>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">DWORD</a></b> The following return values are bit flags combined with a logical OR operator. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>Individual flags can be extracted from the result by combining the result with the logical AND of the desired flag. Do not call this function during <a href="https://docs.microsoft.com/windows/desktop/Dlls/dllmain">DllMain</a> or global objects constructors. This may cause invalid return values.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemeappproperties#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
[DllImport("UXTHEME.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[SupportedOSPlatform("windows6.0.6000")]
internal static extern winmdroot.UI.Controls.SET_THEME_APP_PROPERTIES_FLAGS GetThemeAppProperties();
/// <inheritdoc cref="GetThemeBackgroundContentRect(winmdroot.UI.Controls.HTHEME, winmdroot.Graphics.Gdi.HDC, int, int, winmdroot.Foundation.RECT*, winmdroot.Foundation.RECT*)"/>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT GetThemeBackgroundContentRect(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, in winmdroot.Foundation.RECT pBoundingRect, out winmdroot.Foundation.RECT pContentRect)
{
fixed (winmdroot.Foundation.RECT* pContentRectLocal = &pContentRect)
{
fixed (winmdroot.Foundation.RECT* pBoundingRectLocal = &pBoundingRect)
{
winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeBackgroundContentRect(hTheme, hdc, iPartId, iStateId, pBoundingRectLocal, pContentRectLocal);
return __result;
}
}
}
/// <summary>Retrieves the size of the content area for the background defined by the visual style.</summary>
/// <param name="hTheme">
/// <para>Type: <b>HTHEME</b> Handle to a window's specified theme data. Use <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-openthemedata">OpenThemeData</a> to create an HTHEME.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemebackgroundcontentrect#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="hdc">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HDC</a></b> HDC to use when drawing. This parameter may be set to <b>NULL</b>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemebackgroundcontentrect#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPartId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the part that contains the content area. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemebackgroundcontentrect#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iStateId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the state of the part that contains the content area. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemebackgroundcontentrect#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pBoundingRect">
/// <para>Type: <b>LPCRECT</b> Pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a> structure that contains the total background rectangle, in logical coordinates. This is the area inside the borders or margins.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemebackgroundcontentrect#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pContentRect">
/// <para>Type: <b>LPRECT</b> Pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a> structure that receives the content area background rectangle, in logical coordinates. This rectangle is calculated to fit the content area.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemebackgroundcontentrect#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>A visual style can define a content area within each background image. This is the area where content such as text and icons can be placed without overwriting background borders.</remarks>
[DllImport("UXTHEME.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[SupportedOSPlatform("windows6.0.6000")]
internal static extern unsafe winmdroot.Foundation.HRESULT GetThemeBackgroundContentRect(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.Foundation.RECT* pBoundingRect, winmdroot.Foundation.RECT* pContentRect);
/// <inheritdoc cref="GetThemeBackgroundExtent(winmdroot.UI.Controls.HTHEME, winmdroot.Graphics.Gdi.HDC, int, int, winmdroot.Foundation.RECT*, winmdroot.Foundation.RECT*)"/>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT GetThemeBackgroundExtent(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, in winmdroot.Foundation.RECT pContentRect, out winmdroot.Foundation.RECT pExtentRect)
{
fixed (winmdroot.Foundation.RECT* pExtentRectLocal = &pExtentRect)
{
fixed (winmdroot.Foundation.RECT* pContentRectLocal = &pContentRect)
{
winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeBackgroundExtent(hTheme, hdc, iPartId, iStateId, pContentRectLocal, pExtentRectLocal);
return __result;
}
}
}
/// <summary>Calculates the size and location of the background, defined by the visual style, given the content area.</summary>
/// <param name="hTheme">
/// <para>Type: <b>HTHEME</b> Handle to a window's specified theme data. Use <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-openthemedata">OpenThemeData</a> to create an HTHEME.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemebackgroundextent#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="hdc">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HDC</a></b> HDC to use when drawing. This parameter may be set to <b>NULL</b>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemebackgroundextent#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPartId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the part that contains the content. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemebackgroundextent#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iStateId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the state of the part that contains the content. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemebackgroundextent#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pContentRect">
/// <para>Type: <b>LPCRECT</b> Pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a> structure that contains the content background rectangle, in logical coordinates. This rectangle is returned from <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-getthemebackgroundcontentrect">GetThemeBackgroundContentRect</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemebackgroundextent#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pExtentRect">
/// <para>Type: <b>LPRECT</b> Pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a> structure that receives the background rectangle, in logical coordinates. This rectangle is based on the <i>pContentRect</i>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemebackgroundextent#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>A theme can define a content area within each background image. This is the area where content such as text and icons can be placed without overwriting background borders.</remarks>
[DllImport("UXTHEME.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[SupportedOSPlatform("windows6.0.6000")]
internal static extern unsafe winmdroot.Foundation.HRESULT GetThemeBackgroundExtent(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.Foundation.RECT* pContentRect, winmdroot.Foundation.RECT* pExtentRect);
/// <inheritdoc cref="GetThemeBackgroundRegion(winmdroot.UI.Controls.HTHEME, winmdroot.Graphics.Gdi.HDC, int, int, winmdroot.Foundation.RECT*, winmdroot.Graphics.Gdi.HRGN*)"/>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT GetThemeBackgroundRegion(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, in winmdroot.Foundation.RECT pRect, winmdroot.Graphics.Gdi.HRGN* pRegion)
{
fixed (winmdroot.Foundation.RECT* pRectLocal = &pRect)
{
winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeBackgroundRegion(hTheme, hdc, iPartId, iStateId, pRectLocal, pRegion);
return __result;
}
}
/// <summary>Computes the region for a regular or partially transparent background that is bounded by a specified rectangle.</summary>
/// <param name="hTheme">
/// <para>Type: <b>HTHEME</b> Handle to a window's specified theme data. Use <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-openthemedata">OpenThemeData</a> to create an HTHEME.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemebackgroundregion#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="hdc">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HDC</a></b> HDC to draw into. The DC uses dots per inch (DPI) scaling. This parameter may be set to <b>NULL</b>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemebackgroundregion#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPartId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the part that contains the region. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemebackgroundregion#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iStateId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the state of the part. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemebackgroundregion#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pRect">
/// <para>Type: <b>LPCRECT</b> Pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a> structure that contains, in logical coordinates, the specified rectangle used to compute the region.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemebackgroundregion#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pRegion">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRGN</a>*</b> Pointer to the handle to the computed <a href="https://docs.microsoft.com/windows/desktop/gdi/regions">region</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemebackgroundregion#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>The region handle that is returned by this function should be released when it is no longer needed, using <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-deleteobject">DeleteObject</a>.</remarks>
[DllImport("UxTheme.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[SupportedOSPlatform("windows6.0.6000")]
internal static extern unsafe winmdroot.Foundation.HRESULT GetThemeBackgroundRegion(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.Foundation.RECT* pRect, winmdroot.Graphics.Gdi.HRGN* pRegion);
/// <inheritdoc cref="GetThemeBool(winmdroot.UI.Controls.HTHEME, int, int, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID, winmdroot.Foundation.BOOL*)"/>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT GetThemeBool(winmdroot.UI.Controls.HTHEME hTheme, int iPartId, int iStateId, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID iPropId, out winmdroot.Foundation.BOOL pfVal)
{
fixed (winmdroot.Foundation.BOOL* pfValLocal = &pfVal)
{
winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeBool(hTheme, iPartId, iStateId, iPropId, pfValLocal);
return __result;
}
}
/// <summary>Retrieves the value of a BOOL property from the SysMetrics section of theme data.</summary>
/// <param name="hTheme">
/// <para>Type: <b>HTHEME</b> Handle to a window's specified theme data. Use <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-openthemedata">OpenThemeData</a> to create an HTHEME.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemebool#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPartId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the part containing the BOOL property. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemebool#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iStateId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the state of the part. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemebool#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPropId">Type: <b>int</b></param>
/// <param name="pfVal">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">BOOL</a>*</b> Pointer to a <b>BOOL</b> that receives the retrieved property value.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemebool#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemebool">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT GetThemeBool(winmdroot.UI.Controls.HTHEME hTheme, int iPartId, int iStateId, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID iPropId, winmdroot.Foundation.BOOL* pfVal)
{
winmdroot.Foundation.HRESULT __retVal = LocalExternFunction(hTheme, iPartId, iStateId, (int)iPropId, pfVal);
return __retVal;
[DllImport("UxTheme.dll", ExactSpelling = true, EntryPoint = "GetThemeBool"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
static extern unsafe winmdroot.Foundation.HRESULT LocalExternFunction(winmdroot.UI.Controls.HTHEME hTheme, int iPartId, int iStateId, int iPropId, winmdroot.Foundation.BOOL* pfVal);
}
/// <inheritdoc cref="GetThemeColor(winmdroot.UI.Controls.HTHEME, int, int, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID, winmdroot.Foundation.COLORREF*)"/>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT GetThemeColor(winmdroot.UI.Controls.HTHEME hTheme, int iPartId, int iStateId, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID iPropId, out winmdroot.Foundation.COLORREF pColor)
{
fixed (winmdroot.Foundation.COLORREF* pColorLocal = &pColor)
{
winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeColor(hTheme, iPartId, iStateId, iPropId, pColorLocal);
return __result;
}
}
/// <summary>Retrieves the value of a color property.</summary>
/// <param name="hTheme">
/// <para>Type: <b>HTHEME</b> Handle to a window's specified theme data. Use <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-openthemedata">OpenThemeData</a> to create an HTHEME.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemecolor#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPartId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the part that contains the color property. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemecolor#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iStateId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the state of the part. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemecolor#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPropId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the property to retrieve. For a list of possible values, see <a href="https://docs.microsoft.com/windows/desktop/Controls/property-typedefs">Property Identifiers</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemecolor#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pColor">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">COLORREF</a>*</b> Pointer to a <a href="https://docs.microsoft.com/windows/desktop/gdi/colorref">COLORREF</a> structure that receives the color value.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemecolor#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemecolor">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT GetThemeColor(winmdroot.UI.Controls.HTHEME hTheme, int iPartId, int iStateId, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID iPropId, winmdroot.Foundation.COLORREF* pColor)
{
winmdroot.Foundation.HRESULT __retVal = LocalExternFunction(hTheme, iPartId, iStateId, (int)iPropId, pColor);
return __retVal;
[DllImport("UXTHEME.dll", ExactSpelling = true, EntryPoint = "GetThemeColor"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
static extern unsafe winmdroot.Foundation.HRESULT LocalExternFunction(winmdroot.UI.Controls.HTHEME hTheme, int iPartId, int iStateId, int iPropId, winmdroot.Foundation.COLORREF* pColor);
}
/// <inheritdoc cref="GetThemeDocumentationProperty(winmdroot.Foundation.PCWSTR, winmdroot.Foundation.PCWSTR, winmdroot.Foundation.PWSTR, int)"/>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT GetThemeDocumentationProperty(string pszThemeName, string pszPropertyName, winmdroot.Foundation.PWSTR pszValueBuff, int cchMaxValChars)
{
fixed (char* pszPropertyNameLocal = pszPropertyName)
{
fixed (char* pszThemeNameLocal = pszThemeName)
{
winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeDocumentationProperty(pszThemeNameLocal, pszPropertyNameLocal, pszValueBuff, cchMaxValChars);
return __result;
}
}
}
/// <summary>Retrieves the value for a theme property from the documentation section of the specified theme file.</summary>
/// <param name="pszThemeName">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">LPCWSTR</a></b> Pointer to a string that contains the name of the theme file that will be opened to query for the property.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemedocumentationproperty#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pszPropertyName">Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">LPCWSTR</a></b></param>
/// <param name="pszValueBuff">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">LPWSTR</a></b> Pointer to a string buffer that receives the property string value.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemedocumentationproperty#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="cchMaxValChars">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the maximum number of characters that <i>pszValueBuff</i> can contain.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemedocumentationproperty#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>If the theme property has been localized in the theme files string table, this function returns the localized version.</remarks>
[DllImport("UxTheme.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[SupportedOSPlatform("windows6.0.6000")]
internal static extern winmdroot.Foundation.HRESULT GetThemeDocumentationProperty(winmdroot.Foundation.PCWSTR pszThemeName, winmdroot.Foundation.PCWSTR pszPropertyName, winmdroot.Foundation.PWSTR pszValueBuff, int cchMaxValChars);
/// <inheritdoc cref="GetThemeEnumValue(winmdroot.UI.Controls.HTHEME, int, int, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID, int*)"/>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT GetThemeEnumValue(winmdroot.UI.Controls.HTHEME hTheme, int iPartId, int iStateId, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID iPropId, out int piVal)
{
fixed (int* piValLocal = &piVal)
{
winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeEnumValue(hTheme, iPartId, iStateId, iPropId, piValLocal);
return __result;
}
}
/// <summary>Retrieves the value of an enumerated type property.</summary>
/// <param name="hTheme">
/// <para>Type: <b>HTHEME</b> Handle to a window's specified theme data. Use <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-openthemedata">OpenThemeData</a> to create an HTHEME.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemeenumvalue#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPartId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the part that contains the enumerated type property. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemeenumvalue#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iStateId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the state of the part. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemeenumvalue#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPropId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the property to retrieve. For a list of possible values, see <a href="https://docs.microsoft.com/windows/desktop/Controls/property-typedefs">Property Identifiers</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemeenumvalue#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="piVal">
/// <para>Type: <b>int*</b> Pointer to an <b>int</b> that receives the enumerated type value.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemeenumvalue#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemeenumvalue">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT GetThemeEnumValue(winmdroot.UI.Controls.HTHEME hTheme, int iPartId, int iStateId, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID iPropId, int* piVal)
{
winmdroot.Foundation.HRESULT __retVal = LocalExternFunction(hTheme, iPartId, iStateId, (int)iPropId, piVal);
return __retVal;
[DllImport("UXTHEME.dll", ExactSpelling = true, EntryPoint = "GetThemeEnumValue"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
static extern unsafe winmdroot.Foundation.HRESULT LocalExternFunction(winmdroot.UI.Controls.HTHEME hTheme, int iPartId, int iStateId, int iPropId, int* piVal);
}
/// <summary>Retrieves the value of a filename property.</summary>
/// <param name="hTheme">
/// <para>Type: <b>HTHEME</b> Handle to a window's specified theme data. Use <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-openthemedata">OpenThemeData</a> to create an HTHEME.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemefilename#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPartId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the part that contains the filename property. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemefilename#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iStateId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the state of the part. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemefilename#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPropId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the property to retrieve. For a list of possible values, see <a href="https://docs.microsoft.com/windows/desktop/Controls/property-typedefs">Property Identifiers</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemefilename#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pszThemeFileName">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">LPWSTR</a></b> Pointer to a buffer that receives the retrieved file name.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemefilename#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="cchMaxBuffChars">
/// <para>Type: <b>int</b> Value of type <b>int</b> that receives the maximum number of characters in the file name</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemefilename#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemefilename">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
[SupportedOSPlatform("windows6.0.6000")]
internal static winmdroot.Foundation.HRESULT GetThemeFilename(winmdroot.UI.Controls.HTHEME hTheme, int iPartId, int iStateId, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID iPropId, winmdroot.Foundation.PWSTR pszThemeFileName, int cchMaxBuffChars)
{
winmdroot.Foundation.HRESULT __retVal = LocalExternFunction(hTheme, iPartId, iStateId, (int)iPropId, pszThemeFileName, cchMaxBuffChars);
return __retVal;
[DllImport("UxTheme.dll", ExactSpelling = true, EntryPoint = "GetThemeFilename"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
static extern winmdroot.Foundation.HRESULT LocalExternFunction(winmdroot.UI.Controls.HTHEME hTheme, int iPartId, int iStateId, int iPropId, winmdroot.Foundation.PWSTR pszThemeFileName, int cchMaxBuffChars);
}
/// <inheritdoc cref="GetThemeFont(winmdroot.UI.Controls.HTHEME, winmdroot.Graphics.Gdi.HDC, int, int, int, winmdroot.Graphics.Gdi.LOGFONTW*)"/>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT GetThemeFont(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, int iPropId, out winmdroot.Graphics.Gdi.LOGFONTW pFont)
{
fixed (winmdroot.Graphics.Gdi.LOGFONTW* pFontLocal = &pFont)
{
winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeFont(hTheme, hdc, iPartId, iStateId, iPropId, pFontLocal);
return __result;
}
}
/// <summary>Retrieves the value of a font property.</summary>
/// <param name="hTheme">
/// <para>Type: <b>HTHEME</b> Handle to a window's specified theme data. Use <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-openthemedata">OpenThemeData</a> to create an HTHEME.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemefont#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="hdc">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HDC</a></b> HDC. This parameter may be set to <b>NULL</b>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemefont#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPartId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the part that contains the font property. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemefont#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iStateId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the state of the part. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemefont#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPropId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the property to retrieve. For a list of possible values, see <a href="https://docs.microsoft.com/windows/desktop/Controls/property-typedefs">Property Identifiers</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemefont#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pFont">
/// <para>Type: <b>LOGFONTW*</b> Pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/ns-wingdi-logfonta">LOGFONT</a> structure that receives the font property value.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemefont#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>
/// <para>The font is scaled in dots per inch (DPI) for the current logical screen. If the property is not supported for the specified part and state, E_PROP_ID_UNSUPPORTED may be returned.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemefont#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
[DllImport("UXTHEME.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[SupportedOSPlatform("windows6.0.6000")]
internal static extern unsafe winmdroot.Foundation.HRESULT GetThemeFont(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, int iPropId, winmdroot.Graphics.Gdi.LOGFONTW* pFont);
/// <inheritdoc cref="GetThemeInt(winmdroot.UI.Controls.HTHEME, int, int, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID, int*)"/>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT GetThemeInt(winmdroot.UI.Controls.HTHEME hTheme, int iPartId, int iStateId, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID iPropId, out int piVal)
{
fixed (int* piValLocal = &piVal)
{
winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeInt(hTheme, iPartId, iStateId, iPropId, piValLocal);
return __result;
}
}
/// <summary>Retrieves the value of an int property.</summary>
/// <param name="hTheme">
/// <para>Type: <b>HTHEME</b> Handle to a window's specified theme data. Use <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-openthemedata">OpenThemeData</a> to create an HTHEME.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemeint#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPartId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the part that contains the <b>int</b> property. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemeint#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iStateId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the state of the part. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemeint#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPropId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the property to retrieve. For a list of possible values, see <a href="https://docs.microsoft.com/windows/desktop/Controls/property-typedefs">Property Identifiers</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemeint#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="piVal">
/// <para>Type: <b>int*</b> Pointer to an <b>int</b> that receives the retrieved value.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemeint#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemeint">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT GetThemeInt(winmdroot.UI.Controls.HTHEME hTheme, int iPartId, int iStateId, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID iPropId, int* piVal)
{
winmdroot.Foundation.HRESULT __retVal = LocalExternFunction(hTheme, iPartId, iStateId, (int)iPropId, piVal);
return __retVal;
[DllImport("UXTHEME.dll", ExactSpelling = true, EntryPoint = "GetThemeInt"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
static extern unsafe winmdroot.Foundation.HRESULT LocalExternFunction(winmdroot.UI.Controls.HTHEME hTheme, int iPartId, int iStateId, int iPropId, int* piVal);
}
/// <inheritdoc cref="GetThemeMargins(winmdroot.UI.Controls.HTHEME, winmdroot.Graphics.Gdi.HDC, int, int, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID, winmdroot.Foundation.RECT*, winmdroot.UI.Controls.MARGINS*)"/>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT GetThemeMargins(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID iPropId, winmdroot.Foundation.RECT? prc, out winmdroot.UI.Controls.MARGINS pMargins)
{
fixed (winmdroot.UI.Controls.MARGINS* pMarginsLocal = &pMargins)
{
winmdroot.Foundation.RECT prcLocal = prc ?? default(winmdroot.Foundation.RECT);
winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeMargins(hTheme, hdc, iPartId, iStateId, iPropId, prc.HasValue ? &prcLocal : null, pMarginsLocal);
return __result;
}
}
/// <summary>Retrieves the value of a MARGINS property.</summary>
/// <param name="hTheme">
/// <para>Type: <b>HTHEME</b> Handle to a window's specified theme data. Use <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-openthemedata">OpenThemeData</a> to create an HTHEME.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthememargins#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="hdc">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HDC</a></b> HDC to select fonts into. This parameter may be set to <b>NULL</b>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthememargins#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPartId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the part that contains the <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/ns-uxtheme-margins">MARGINS</a> property. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthememargins#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iStateId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the state of the part. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthememargins#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPropId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the property to retrieve. For a list of possible values, see <a href="https://docs.microsoft.com/windows/desktop/Controls/property-typedefs">Property Identifiers</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthememargins#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="prc">
/// <para>Type: <b>LPRECT</b> Pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a> structure that contains the rectangle that specifies the area to be drawn into. This parameter may be set to <b>NULL</b>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthememargins#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pMargins">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/ns-uxtheme-margins">MARGINS</a>*</b> Pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/ns-uxtheme-margins">MARGINS</a> structure that receives the retrieved value.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthememargins#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthememargins">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT GetThemeMargins(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID iPropId, [Optional] winmdroot.Foundation.RECT* prc, winmdroot.UI.Controls.MARGINS* pMargins)
{
winmdroot.Foundation.HRESULT __retVal = LocalExternFunction(hTheme, hdc, iPartId, iStateId, (int)iPropId, prc, pMargins);
return __retVal;
[DllImport("UXTHEME.dll", ExactSpelling = true, EntryPoint = "GetThemeMargins"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
static extern unsafe winmdroot.Foundation.HRESULT LocalExternFunction(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, int iPropId, [Optional] winmdroot.Foundation.RECT* prc, winmdroot.UI.Controls.MARGINS* pMargins);
}
/// <inheritdoc cref="GetThemePartSize(winmdroot.UI.Controls.HTHEME, winmdroot.Graphics.Gdi.HDC, int, int, winmdroot.Foundation.RECT*, winmdroot.UI.Controls.THEMESIZE, winmdroot.Foundation.SIZE*)"/>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT GetThemePartSize(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.Foundation.RECT? prc, winmdroot.UI.Controls.THEMESIZE eSize, out winmdroot.Foundation.SIZE psz)
{
fixed (winmdroot.Foundation.SIZE* pszLocal = &psz)
{
winmdroot.Foundation.RECT prcLocal = prc ?? default(winmdroot.Foundation.RECT);
winmdroot.Foundation.HRESULT __result = PInvoke.GetThemePartSize(hTheme, hdc, iPartId, iStateId, prc.HasValue ? &prcLocal : null, eSize, pszLocal);
return __result;
}
}
/// <summary>Calculates the original size of the part defined by a visual style.</summary>
/// <param name="hTheme">
/// <para>Type: <b>HTHEME</b> Handle to a window's specified theme data. Use <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-openthemedata">OpenThemeData</a> to create an HTHEME.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemepartsize#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="hdc">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HDC</a></b> HDC to select fonts into.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemepartsize#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPartId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the part to calculate the size of. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemepartsize#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iStateId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the state of the part. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemepartsize#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="prc">
/// <para>Type: <b>LPCRECT</b> Pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a> structure that contains the rectangle used for the part drawing destination. This parameter may be set to <b>NULL</b>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemepartsize#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="psz">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-size">SIZE</a>*</b> Pointer to a <a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-size">SIZE</a> structure that receives the dimensions of the specified part.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemepartsize#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemepartsize">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
[DllImport("UXTHEME.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[SupportedOSPlatform("windows6.0.6000")]
internal static extern unsafe winmdroot.Foundation.HRESULT GetThemePartSize(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, [Optional] winmdroot.Foundation.RECT* prc, winmdroot.UI.Controls.THEMESIZE eSize, winmdroot.Foundation.SIZE* psz);
/// <inheritdoc cref="GetThemePosition(winmdroot.UI.Controls.HTHEME, int, int, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID, global::System.Drawing.Point*)"/>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT GetThemePosition(winmdroot.UI.Controls.HTHEME hTheme, int iPartId, int iStateId, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID iPropId, out global::System.Drawing.Point pPoint)
{
fixed (global::System.Drawing.Point* pPointLocal = &pPoint)
{
winmdroot.Foundation.HRESULT __result = PInvoke.GetThemePosition(hTheme, iPartId, iStateId, iPropId, pPointLocal);
return __result;
}
}
/// <summary>Retrieves the value of a position property.</summary>
/// <param name="hTheme">
/// <para>Type: <b>HTHEME</b> Handle to a window's specified theme data. Use <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-openthemedata">OpenThemeData</a> to create an HTHEME.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemeposition#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPartId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the part that contains the position property. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemeposition#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iStateId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the state of the part. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemeposition#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPropId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the property to retrieve. For a list of possible values, see <a href="https://docs.microsoft.com/windows/desktop/Controls/property-typedefs">Property Identifiers</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemeposition#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pPoint">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-point">POINT</a>*</b> Pointer to a <a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-point">POINT</a> structure that receives the position value.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemeposition#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>The part in which the position is located determines the possible state values. For example, if the position is in a check box, the state could be checked or unchecked, but in a caption the possible states are active, inactive, or disabled.</remarks>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT GetThemePosition(winmdroot.UI.Controls.HTHEME hTheme, int iPartId, int iStateId, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID iPropId, global::System.Drawing.Point* pPoint)
{
winmdroot.Foundation.HRESULT __retVal = LocalExternFunction(hTheme, iPartId, iStateId, (int)iPropId, pPoint);
return __retVal;
[DllImport("UXTHEME.dll", ExactSpelling = true, EntryPoint = "GetThemePosition"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
static extern unsafe winmdroot.Foundation.HRESULT LocalExternFunction(winmdroot.UI.Controls.HTHEME hTheme, int iPartId, int iStateId, int iPropId, global::System.Drawing.Point* pPoint);
}
/// <summary>Retrieves the value of a string property.</summary>
/// <param name="hTheme">
/// <para>Type: <b>HTHEME</b> Handle to a window's specified theme data. Use <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-openthemedata">OpenThemeData</a> to create an HTHEME.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemestring#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPartId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the part containing the string property. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemestring#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iStateId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the state of the part. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemestring#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPropId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the property to retrieve. For a list of possible values, see <a href="https://docs.microsoft.com/windows/desktop/Controls/property-typedefs">Property Identifiers</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemestring#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pszBuff">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">LPWSTR</a></b> Pointer to a buffer that receives the string value.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemestring#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="cchMaxBuffChars">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the maximum number of characters <i>pszBuff</i> can contain.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemestring#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemestring">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
[DllImport("UxTheme.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[SupportedOSPlatform("windows6.0.6000")]
internal static extern winmdroot.Foundation.HRESULT GetThemeString(winmdroot.UI.Controls.HTHEME hTheme, int iPartId, int iStateId, int iPropId, winmdroot.Foundation.PWSTR pszBuff, int cchMaxBuffChars);
/// <summary>Retrieves the Boolean value of a system metric.</summary>
/// <param name="hTheme">
/// <para>Type: <b>HTHEME</b> Handle to theme data.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemesysbool#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iBoolId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the system Boolean metric desired. May be the following value. </para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemesysbool#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">BOOL</a></b> Value of desired system metric.</para>
/// </returns>
/// <remarks>If the theme data handle is not a <b>NULL</b> handle, this function returns the desired <b>BOOL</b> from the SysMetrics section of the visual style. If the theme data handle is <b>NULL</b>, this function returns the value of the specified system Boolean.</remarks>
[SupportedOSPlatform("windows6.0.6000")]
internal static winmdroot.Foundation.BOOL GetThemeSysBool(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID iBoolId)
{
winmdroot.Foundation.BOOL __retVal = LocalExternFunction(hTheme, (int)iBoolId);
return __retVal;
[DllImport("UxTheme.dll", ExactSpelling = true, EntryPoint = "GetThemeSysBool"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
static extern winmdroot.Foundation.BOOL LocalExternFunction(winmdroot.UI.Controls.HTHEME hTheme, int iBoolId);
}
/// <inheritdoc cref="GetThemeSysInt(winmdroot.UI.Controls.HTHEME, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID, int*)"/>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT GetThemeSysInt(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID iIntId, out int piValue)
{
fixed (int* piValueLocal = &piValue)
{
winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeSysInt(hTheme, iIntId, piValueLocal);
return __result;
}
}
/// <summary>Retrieves the value of a system int.</summary>
/// <param name="hTheme">
/// <para>Type: <b>HTHEME</b> Handle to theme data.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemesysint#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iIntId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the desired system <b>int</b>. May be the following value. </para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemesysint#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="piValue">
/// <para>Type: <b>int*</b> Pointer to an <b>int</b> that receives the system integer value.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemesysint#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemesysint">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT GetThemeSysInt(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.UI.Controls.THEME_PROPERTY_SYMBOL_ID iIntId, int* piValue)
{
winmdroot.Foundation.HRESULT __retVal = LocalExternFunction(hTheme, (int)iIntId, piValue);
return __retVal;
[DllImport("UxTheme.dll", ExactSpelling = true, EntryPoint = "GetThemeSysInt"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
static extern unsafe winmdroot.Foundation.HRESULT LocalExternFunction(winmdroot.UI.Controls.HTHEME hTheme, int iIntId, int* piValue);
}
/// <inheritdoc cref="GetThemeTextExtent(winmdroot.UI.Controls.HTHEME, winmdroot.Graphics.Gdi.HDC, int, int, winmdroot.Foundation.PCWSTR, int, winmdroot.Graphics.Gdi.DRAW_TEXT_FORMAT, winmdroot.Foundation.RECT*, winmdroot.Foundation.RECT*)"/>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT GetThemeTextExtent(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, string pszText, int cchCharCount, winmdroot.Graphics.Gdi.DRAW_TEXT_FORMAT dwTextFlags, winmdroot.Foundation.RECT? pBoundingRect, out winmdroot.Foundation.RECT pExtentRect)
{
fixed (winmdroot.Foundation.RECT* pExtentRectLocal = &pExtentRect)
{
fixed (char* pszTextLocal = pszText)
{
winmdroot.Foundation.RECT pBoundingRectLocal = pBoundingRect ?? default(winmdroot.Foundation.RECT);
winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeTextExtent(hTheme, hdc, iPartId, iStateId, pszTextLocal, cchCharCount, dwTextFlags, pBoundingRect.HasValue ? &pBoundingRectLocal : null, pExtentRectLocal);
return __result;
}
}
}
/// <summary>Calculates the size and location of the specified text when rendered in the visual style font.</summary>
/// <param name="hTheme">
/// <para>Type: <b>HTHEME</b> Handle to a window's specified theme data. Use <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-openthemedata">OpenThemeData</a> to create an HTHEME.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemetextextent#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="hdc">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HDC</a></b> HDC to select the font into.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemetextextent#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPartId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the part in which the text will be drawn. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemetextextent#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iStateId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the state of the part. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemetextextent#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pszText">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">LPCWSTR</a></b> Pointer to a string that contains the text to draw.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemetextextent#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="cchCharCount">
/// <para>Type: <b>int</b> Value of type <b>int</b> that contains the number of characters to draw. If the parameter is set to -1, all the characters in the string are drawn.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemetextextent#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="dwTextFlags">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">DWORD</a></b> <b>DWORD</b> that contains one or more values that specify the string's formatting. See <a href="https://docs.microsoft.com/windows/desktop/Controls/theme-format-values">Format Values</a> for possible parameter values.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemetextextent#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pBoundingRect">
/// <para>Type: <b>LPCRECT</b> Pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a> structure that contains the rectangle used to control layout of the text. This parameter may be set to <b>NULL</b>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemetextextent#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pExtentRect">
/// <para>Type: <b>LPRECT</b> Pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a> structure that contains, in logical coordinates, the rectangle required to fit the rendered text.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemetextextent#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemetextextent">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
[DllImport("UxTheme.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[SupportedOSPlatform("windows6.0.6000")]
internal static extern unsafe winmdroot.Foundation.HRESULT GetThemeTextExtent(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.Foundation.PCWSTR pszText, int cchCharCount, winmdroot.Graphics.Gdi.DRAW_TEXT_FORMAT dwTextFlags, [Optional] winmdroot.Foundation.RECT* pBoundingRect, winmdroot.Foundation.RECT* pExtentRect);
/// <inheritdoc cref="GetThemeTextMetrics(winmdroot.UI.Controls.HTHEME, winmdroot.Graphics.Gdi.HDC, int, int, winmdroot.Graphics.Gdi.TEXTMETRICW*)"/>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT GetThemeTextMetrics(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, out winmdroot.Graphics.Gdi.TEXTMETRICW ptm)
{
fixed (winmdroot.Graphics.Gdi.TEXTMETRICW* ptmLocal = &ptm)
{
winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeTextMetrics(hTheme, hdc, iPartId, iStateId, ptmLocal);
return __result;
}
}
/// <summary>Retrieves information about the font specified by a visual style for a particular part.</summary>
/// <param name="hTheme">
/// <para>Type: <b>HTHEME</b> Handle to a window's specified theme data. Use <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-openthemedata">OpenThemeData</a> to create an HTHEME.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemetextmetrics#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="hdc">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HDC</a></b> HDC to use for screen context. This parameter may be set to <b>NULL</b>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemetextmetrics#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPartId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the part to retrieve font information about. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemetextmetrics#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iStateId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the state of the part. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemetextmetrics#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="ptm">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/wingdi/ns-wingdi-textmetrica">TEXTMETRIC</a>*</b> Receives the font information.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemetextmetrics#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-getthemetextmetrics">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
[DllImport("UxTheme.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[SupportedOSPlatform("windows6.0.6000")]
internal static extern unsafe winmdroot.Foundation.HRESULT GetThemeTextMetrics(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.Graphics.Gdi.TEXTMETRICW* ptm);
/// <inheritdoc cref="HitTestThemeBackground(winmdroot.UI.Controls.HTHEME, winmdroot.Graphics.Gdi.HDC, int, int, winmdroot.UI.Controls.HIT_TEST_BACKGROUND_OPTIONS, winmdroot.Foundation.RECT*, winmdroot.Graphics.Gdi.HRGN, global::System.Drawing.Point, ushort*)"/>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT HitTestThemeBackground(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.UI.Controls.HIT_TEST_BACKGROUND_OPTIONS dwOptions, in winmdroot.Foundation.RECT pRect, winmdroot.Graphics.Gdi.HRGN hrgn, global::System.Drawing.Point ptTest, out ushort pwHitTestCode)
{
fixed (ushort* pwHitTestCodeLocal = &pwHitTestCode)
{
fixed (winmdroot.Foundation.RECT* pRectLocal = &pRect)
{
winmdroot.Foundation.HRESULT __result = PInvoke.HitTestThemeBackground(hTheme, hdc, iPartId, iStateId, dwOptions, pRectLocal, hrgn, ptTest, pwHitTestCodeLocal);
return __result;
}
}
}
/// <summary>Retrieves a hit test code for a point in the background specified by a visual style.</summary>
/// <param name="hTheme">
/// <para>Type: <b>HTHEME</b> Handle to a window's specified theme data. Use <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-openthemedata">OpenThemeData</a> to create an HTHEME.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-hittestthemebackground#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="hdc">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HDC</a></b> HDC to use when drawing. This parameter may be set to <b>NULL</b>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-hittestthemebackground#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPartId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the part. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-hittestthemebackground#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iStateId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the state of the part. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-hittestthemebackground#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="dwOptions">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">DWORD</a></b> <b>DWORD</b> that specifies the hit test options. See <a href="https://docs.microsoft.com/windows/desktop/Controls/theme-hit-test-options">Hit Test Options</a> for a list of options.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-hittestthemebackground#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pRect">
/// <para>Type: <b>LPCRECT</b> Pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a> structure that contains, in logical coordinates, the rectangle that bounds the background.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-hittestthemebackground#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="hrgn">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRGN</a></b> Handle to a region that can be used to specify the bounds of a hit test area. This parameter may be set to <b>NULL</b>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-hittestthemebackground#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="ptTest">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-point">POINT</a></b></para>
/// <para><a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-point">POINT</a> structure that contains the coordinates of the point.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-hittestthemebackground#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pwHitTestCode">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">WORD</a>*</b> <b>WORD</b> that receives the hit test code that indicates whether the point in <i>ptTest</i> is in the background area bounded by <i>pRect</i> or <i>hrgn</i>. See <a href="https://docs.microsoft.com/windows/desktop/Controls/theme-hit-test-retval">Hit Test Return Values</a> for a list of values returned.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-hittestthemebackground#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>The values in <i>ptTest</i> and <i>pRect</i> should be in the same coordinate system, such as client or screen. If the <i>hrgn</i> parameter is used, it must be specified in the same coordinates as <i>pRect</i> and <i>ptTest</i>.</remarks>
[DllImport("UxTheme.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[SupportedOSPlatform("windows6.0.6000")]
internal static extern unsafe winmdroot.Foundation.HRESULT HitTestThemeBackground(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.UI.Controls.HIT_TEST_BACKGROUND_OPTIONS dwOptions, winmdroot.Foundation.RECT* pRect, winmdroot.Graphics.Gdi.HRGN hrgn, global::System.Drawing.Point ptTest, ushort* pwHitTestCode);
/// <summary>Reports whether the current application's user interface displays using visual styles.</summary>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">BOOL</a></b> Returns one of the following values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>Prior to Windows 8, a visual style can be turned off in Control Panel, so that an application can support visual styles but not have a visual style applied at a given time. In Windows 8, it is not possible to turn off visual styles.</para>
/// <para>Do not call this function during <a href="https://docs.microsoft.com/windows/desktop/Dlls/dllmain">DllMain</a> or global objects constructors. This may cause invalid return values.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-isappthemed#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
[DllImport("UXTHEME.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[SupportedOSPlatform("windows6.0.6000")]
internal static extern winmdroot.Foundation.BOOL IsAppThemed();
/// <summary>Retrieves whether the background specified by the visual style has transparent pieces or alpha-blended pieces.</summary>
/// <param name="hTheme">
/// <para>Type: <b>HTHEME</b> Handle to a window's specified theme data. Use <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-openthemedata">OpenThemeData</a> to create an HTHEME.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-isthemebackgroundpartiallytransparent#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPartId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the part. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-isthemebackgroundpartiallytransparent#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iStateId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the state of the part. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-isthemebackgroundpartiallytransparent#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">BOOL</a></b> Returns one of the following values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-isthemebackgroundpartiallytransparent">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
[DllImport("UxTheme.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[SupportedOSPlatform("windows6.0.6000")]
internal static extern winmdroot.Foundation.BOOL IsThemeBackgroundPartiallyTransparent(winmdroot.UI.Controls.HTHEME hTheme, int iPartId, int iStateId);
/// <summary>Retrieves whether a visual style has defined parameters for the specified part and state.</summary>
/// <param name="hTheme">
/// <para>Type: <b>HTHEME</b> Handle to a window's specified theme data. Use <a href="https://docs.microsoft.com/windows/desktop/api/uxtheme/nf-uxtheme-openthemedata">OpenThemeData</a> to create an HTHEME.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-isthemepartdefined#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iPartId">
/// <para>Type: <b>int</b> Value of type <b>int</b> that specifies the part. See <a href="https://docs.microsoft.com/windows/desktop/Controls/parts-and-states">Parts and States</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-isthemepartdefined#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="iStateId">
/// <para>Type: <b>int</b> Currently unused. The value should be 0.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-isthemepartdefined#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">BOOL</a></b> Returns one of the following values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-isthemepartdefined">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
[DllImport("UXTHEME.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[SupportedOSPlatform("windows6.0.6000")]
internal static extern winmdroot.Foundation.BOOL IsThemePartDefined(winmdroot.UI.Controls.HTHEME hTheme, int iPartId, int iStateId);
/// <inheritdoc cref="OpenThemeData(winmdroot.Foundation.HWND, winmdroot.Foundation.PCWSTR)"/>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.UI.Controls.HTHEME OpenThemeData(winmdroot.Foundation.HWND hwnd, string pszClassList)
{
fixed (char* pszClassListLocal = pszClassList)
{
winmdroot.UI.Controls.HTHEME __result = PInvoke.OpenThemeData(hwnd, pszClassListLocal);
return __result;
}
}
/// <summary>Opens the theme data for a window and its associated class.</summary>
/// <param name="hwnd">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HWND</a></b> Handle of the window for which theme data is required.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-openthemedata#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pszClassList">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">LPCWSTR</a></b> Pointer to a string that contains a semicolon-separated list of classes.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-openthemedata#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HTHEME</b> <b>OpenThemeData</b> tries to match each class, one at a time, to a class data section in the active theme. If a match is found, an associated HTHEME handle is returned. If no match is found <b>NULL</b> is returned.</para>
/// </returns>
/// <remarks>
/// <para>The <i>pszClassList</i> parameter contains a list, not just a single name, to provide the class an opportunity to get the best match between the class and the current visual style. For example, a button might pass L"OkButton;Button" if its ID is ID_OK. If the current visual style has an entry for OkButton, that is used; otherwise no visual style is applied. Class names for the Aero theme are defined in AeroStyle.xml.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-openthemedata#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
[DllImport("UXTHEME.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[SupportedOSPlatform("windows6.0.6000")]
internal static extern winmdroot.UI.Controls.HTHEME OpenThemeData(winmdroot.Foundation.HWND hwnd, winmdroot.Foundation.PCWSTR pszClassList);
/// <summary>Sets the flags that determine how visual styles are implemented in the calling application.</summary>
/// <param name="dwFlags">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">DWORD</a></b> <b>DWORD</b> that specifies one or more of the following bit flags, which can be combined with a logical OR. </para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-setthemeappproperties#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <remarks>After you set the flags, send a <a href="https://docs.microsoft.com/windows/desktop/winmsg/wm-themechanged">WM_THEMECHANGED</a> message to your application's main window for the changes to take effect.</remarks>
[DllImport("UxTheme.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[SupportedOSPlatform("windows6.0.6000")]
internal static extern void SetThemeAppProperties(winmdroot.UI.Controls.SET_THEME_APP_PROPERTIES_FLAGS dwFlags);
/// <inheritdoc cref="SetWindowTheme(winmdroot.Foundation.HWND, winmdroot.Foundation.PCWSTR, winmdroot.Foundation.PCWSTR)"/>
[SupportedOSPlatform("windows6.0.6000")]
internal static unsafe winmdroot.Foundation.HRESULT SetWindowTheme(winmdroot.Foundation.HWND hwnd, string pszSubAppName, string pszSubIdList)
{
fixed (char* pszSubIdListLocal = pszSubIdList)
{
fixed (char* pszSubAppNameLocal = pszSubAppName)
{
winmdroot.Foundation.HRESULT __result = PInvoke.SetWindowTheme(hwnd, pszSubAppNameLocal, pszSubIdListLocal);
return __result;
}
}
}
/// <summary>Causes a window to use a different set of visual style information than its class normally uses.</summary>
/// <param name="hwnd">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HWND</a></b> Handle to the window whose visual style information is to be changed.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-setwindowtheme#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pszSubAppName">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">LPCWSTR</a></b> Pointer to a string that contains the application name to use in place of the calling application's name. If this parameter is <b>NULL</b>, the calling application's name is used.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-setwindowtheme#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pszSubIdList">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">LPCWSTR</a></b> Pointer to a string that contains a semicolon-separated list of CLSID names to use in place of the actual list passed by the window's class. If this parameter is <b>NULL</b>, the ID list from the calling class is used.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-setwindowtheme#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>
/// <para>The theme manager retains the <i>pszSubAppName</i> and the <i>pszSubIdList</i> associations through the lifetime of the window, even if visual styles subsequently change. The window is sent a <a href="https://docs.microsoft.com/windows/desktop/winmsg/wm-themechanged">WM_THEMECHANGED</a> message at the end of a <b>SetWindowTheme</b> call, so that the new visual style can be found and applied.</para>
/// <para>When <i>pszSubAppName</i> and <i>pszSubIdList</i> are <b>NULL</b>, the theme manager removes the previously applied associations. You can prevent visual styles from being applied to a specified window by specifying an empty string, (L" "), which does not match any section entries.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-setwindowtheme#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
[DllImport("UXTHEME.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[SupportedOSPlatform("windows6.0.6000")]
internal static extern winmdroot.Foundation.HRESULT SetWindowTheme(winmdroot.Foundation.HWND hwnd, winmdroot.Foundation.PCWSTR pszSubAppName, winmdroot.Foundation.PCWSTR pszSubIdList);
}
}
|