GetThemeSysString function (uxtheme.h)

Retrieves the value of a system string.

Syntax

HRESULT GetThemeSysString(
  [in]  HTHEME hTheme,
  [in]  int    iStringId,
  [out] LPWSTR pszStringBuff,
  [in]  int    cchMaxStringChars
);

Parameters

[in] hTheme

Type: HTHEME

Handle to theme data.

[in] iStringId

Type: int

Value of type int that specifies a system string. May be one of the following values.

Value Meaning
TMT_CSSNAME
The name of the CSS file associated with the theme specified by hTheme.
TMT_XMLNAME
The name of the XML file associated with the theme specified by hTheme.

[out] pszStringBuff

Type: LPWSTR

Pointer to the buffer that receives the string value from this function.

[in] cchMaxStringChars

Type: int

Value of type int that specifies the maximum number of characters the string buffer can hold.

Return value

Type: HRESULT

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

Remarks

If the theme data handle is not a NULL handle, this function returns the desired string from the SysMetrics section of the visual style. If the theme data handle is NULL, this function returns the value of the global system metric of the same type.

Requirements

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