GetThemeFont function
Retrieves the value of a font property.
Syntax
HRESULT GetThemeFont( _In_ HTHEME hTheme, _In_ HDC hdc, _In_ int iPartId, _In_ int iStateId, _In_ int iPropId, _Out_ LOGFONTW *pFont );
Parameters
- hTheme [in]
-
Type: HTHEME
Handle to a window's specified theme data. Use OpenThemeData to create an HTHEME.
- hdc [in]
-
Type: HDC
HDC. This parameter may be set to NULL.
- iPartId [in]
-
Type: int
Value of type int that specifies the part that contains the font property. See Parts and States.
- iStateId [in]
-
Type: int
Value of type int that specifies the state of the part. See Parts and States.
- iPropId [in]
-
Type: int
Value of type int that specifies the property to retrieve. For a list of possible values, see Property Identifiers.
- pFont [out]
-
Type: LOGFONTW*
Pointer to a LOGFONT structure that receives the font property value.
Windows XP and earlier: Pointer to a LOGFONT structure.
Return value
Type: HRESULT
If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
The font is scaled in dots per inch (DPI) for the current logical screen.
If the property is not supported for the specified part and state, E_PROP_ID_UNSUPPORTED may be returned.
Requirements
|
Minimum supported client | Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server | Windows Server 2003 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 10/27/2012