Skip to content

Commit

Permalink
Fixed generic GetThemeColor (dahall#395)
Browse files Browse the repository at this point in the history
  • Loading branch information
5cover authored May 10, 2023
1 parent 44a0def commit 8d84d71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PInvoke/UxTheme/UXTHEME.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1535,7 +1535,7 @@ public static extern HRESULT GetCurrentThemeName([MarshalAs(UnmanagedType.LPWStr
/// <para>Type: <c><c>HRESULT</c></c></para>
/// <para>If this function succeeds, it returns <c>S_OK</c>. Otherwise, it returns an <c>HRESULT</c> error code.</para>
/// </returns>
public static HRESULT GetThemeColor<TPart, TState, TProp>(HTHEME hTheme, int iPartId, int iStateId, int iPropId, out COLORREF pColor)
public static HRESULT GetThemeColor<TPart, TState, TProp>(HTHEME hTheme, TPart iPartId, TState iStateId, TProp iPropId, out COLORREF pColor)
where TPart : IConvertible where TState : IConvertible where TProp : IConvertible =>
GetThemeColor(hTheme, Convert.ToInt32(iPartId), Convert.ToInt32(iStateId), Convert.ToInt32(iPropId), out pColor);

Expand Down Expand Up @@ -3769,4 +3769,4 @@ private SafeHTHEME() : base()
protected override bool InternalReleaseHandle() => CloseThemeData(this).Succeeded;
}
}
}
}

0 comments on commit 8d84d71

Please sign in to comment.