GetThemeStream function (uxtheme.h)

Retrieves a data stream corresponding to a specified theme, starting from a specified part, state, and property.

Syntax

HRESULT GetThemeStream(
  [in]  HTHEME    hTheme,
  [in]  int       iPartId,
  [in]  int       iStateId,
  [in]  int       iPropId,
  [out] VOID      **ppvStream,
  [out] DWORD     *pcbStream,
  [in]  HINSTANCE hInst
);

Parameters

[in] hTheme

Type: HTHEME

Handle to the theme from which the stream will be retrieved.

[in] iPartId

Type: int

Specifies the part to retrieve a stream from. See Parts and States.

[in] iStateId

Type: int

Specifies the state of the part.

[in] iPropId

Type: int

Specifies the property to retrieve.

[out] ppvStream

Type: VOID**

Address of a pointer that receives the stream.

[out] pcbStream

Type: DWORD*

Pointer that receives the length, in bytes, of the stream received by ppvStream.

[in] hInst

Type: HINSTANCE

If iPropId is TMT_STREAM, this value is NULL. If iPropId is TMT_DISKSTREAM, this value is the HINSTANCE of a loaded styles file.

Return value

Type: HRESULT

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

Remarks

Windows 8: In high contrast mode, the data stream retrieved by this function is not valid after the hTheme theme handle is closed.

The data stream retrieved by this function is not a copy; do not delete or close the data stream after using it.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header uxtheme.h
Library UxTheme.lib
DLL UxTheme.dll

See also

Parts and States