Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

OpenThemeDataEx function

Opens the theme data associated with a window for specified theme classes.

Syntax


HTHEME OpenThemeDataEx(
  _In_  HWND hwnd,
  _In_  LPCWSTR pszClassIdList,
  _In_  DWORD dwFlags
);

Parameters

hwnd [in]

Type: HWND

A handle to a window or control that the theme is to be retrieved from.

pszClassIdList [in]

Type: LPCWSTR

A semicolon-separated list of class names to match.

dwFlags [in]

Type: DWORD

Optional flags that control how to return the theme data. May be set to a combination of the following values.

ValueMeaning
OTD_FORCE_RECT_SIZING

Forces drawn images from this theme to stretch to fit the rectangles specified by drawing functions.

OTD_NONCLIENT

Allows theme elements to be drawn in the non-client area of the window.

 

Return value

Type: HTHEME

If a match is found, a valid handle to a theme is returned. Otherwise, a NULL value will be returned.

Remarks

The string specified by pszClassIdList will be tokenized using semicolons as a delimiter. The names are matched against class names one token at a time. If no match is found for a particular token, the next token will be matched. If a match is found, the return value of the function will be the theme handle associated with the matched class.

In Windows XP, this function is not included in a public header and is only exported by ordinal. It must be called by ordinal 61 from Uxtheme.dll. It is included in Uxtheme.h as of Windows Vista and can be called normally.

Class names for the Aero theme are defined in AeroStyle.xml.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Uxtheme.h

Library

UxTheme.lib

DLL

UxTheme.dll

See also

OpenThemeData

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.