GetThemeBackgroundRegion

[DllImport("uxtheme.dll", SetLastError = true)]
public static extern HRESULT GetThemeBackgroundRegion(
   IntPtr hTheme,
   HDC hdc,
   int iPartId,
   int iStateId,
   ref RECT pRect,
   out IntPtr pRegion
);

Microsoft documentation: Link

Last updated