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

GetThemeBitmap function

Retrieves the bitmap associated with a particular theme, part, state, and property.

Syntax


HRESULT GetThemeBitmap(
  _In_  HTHEME  hTheme,
  _In_  int     iPartId,
  _In_  int     iStateId,
  _In_  int     iPropId,
  _In_  ULONG   dwFlags,
  _Out_ HBITMAP *phBitmap
);

Parameters

hTheme [in]

Type: HTHEME

A handle to theme data.

iPartId [in]

Type: int

The part that contains the bitmap. See Parts and States.

iStateId [in]

Type: int

The state of the part.

iPropId [in]

Type: int

The property to retrieve. Pass zero to automatically select the first available bitmap for this part and state, or use one of the following values.

ValueMeaning
TMT_DIBDATA

The background image.

TMT_GLYPHDIBDATA

The glyph image drawn on top of the background, if present.

TMT_HBITMAP

Not currently supported.

 

dwFlags [in]

Type: ULONG

The flags that specify how the bitmap is to be retrieved. Can be one of the following values.

ValueMeaning
GBF_DIRECT

Retrieves a handle to the existing bitmap.

GBF_COPY

Retrieves a copy of the bitmap.

GBF_VALIDBITS

GBF_DIRECT | GBF_COPY

 

phBitmap [out]

Type: HBITMAP*

A pointer that receives a handle to the requested bitmap.

Return value

Type: HRESULT

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

If dwFlags is set to GBF_COPY, release the bitmap stored in phBitmap when no longer needed by calling DeleteObject.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Uxtheme.h

Library

UxTheme.lib

DLL

UxTheme.dll

 

 

Community Additions

ADD
Show:
© 2015 Microsoft