DrawThemeBackground function uxtheme

void DrawThemeBackground(
  1. HTHEME hTheme,
  2. HDC hdc,
  3. int iPartId,
  4. int iStateId,
  5. Pointer<RECT> pRect,
  6. Pointer<RECT>? pClipRect,
)

Draws the border and fill defined by the visual style for the specified control part.

Throws a WindowsException on failure.

To learn more, see learn.microsoft.com/windows/win32/api/uxtheme/nf-uxtheme-drawthemebackground.

Implementation

@pragma('vm:prefer-inline')
void DrawThemeBackground(
  HTHEME hTheme,
  HDC hdc,
  int iPartId,
  int iStateId,
  Pointer<RECT> pRect,
  Pointer<RECT>? pClipRect,
) {
  final hr$ = HRESULT(
    _DrawThemeBackground(
      hTheme,
      hdc,
      iPartId,
      iStateId,
      pRect,
      pClipRect ?? nullptr,
    ),
  );
  if (hr$.isError) throw WindowsException(hr$);
}