Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
IsThemeBackgroundPartiallyTransparent
Collapse the table of content
Expand the table of content

IsThemeBackgroundPartiallyTransparent function

Retrieves whether the background specified by the visual style has transparent pieces or alpha-blended pieces.

Syntax


BOOL IsThemeBackgroundPartiallyTransparent(
  _In_ HTHEME hTheme,
  _In_ int    iPartId,
  _In_ int    iStateId
);

Parameters

hTheme [in]

Type: HTHEME

Handle to a window's specified theme data. Use OpenThemeData to create an HTHEME.

iPartId [in]

Type: int

Value of type int that specifies the part. See Parts and States.

iStateId [in]

Type: int

Value of type int that specifies the state of the part. See Parts and States.

Return value

Type: BOOL

Returns one of the following values.

Return codeDescription
TRUE

The theme-specified background for a particular iPartId and iStateId has transparent pieces or alpha-blended pieces.

FALSE

The theme-specified background for a particular iPartId and iStateId does not have transparent pieces or alpha-blended pieces.

 

Examples

Prior to calling DrawThemeBackground to draw the background image for a window, you may call IsThemeBackgroundPartiallyTransparent. This method determines whether DrawThemeParentBackground should be called to draw in backgrounds behind partially-transparent or alpha-blended child controls, and is demonstrated in the following example.


if (_hTheme)
{
  if (IsThemeBackgroundPartiallyTransparent(_hTheme, BP_PUSHBUTTON, _iStateId))
  {
    DrawThemeParentBackground(_hwnd, hdcPaint, prcPaint);
  }

  DrawThemeBackground(_hTheme,
                    hdcPaint,
                    BP_PUSHBUTTON,
                    _iStateId,
                    &rcClient,
                    prcPaint);
}


Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Uxtheme.h

Library

UxTheme.lib

DLL

UxTheme.dll

 

 

Community Additions

ADD
Show:
© 2015 Microsoft