Share via


GetTextMetrics

This function fills the specified buffer with the metrics for the currently selected font.

BOOL GetTextMetrics(
HDC hdc, 
LPTEXTMETRIC lptm
); 

Parameters

  • hdc
    [in] Handle to the device context (DC).
  • lptm
    [out] Long pointer to the TEXTMETRIC structure that is to receive the metrics.

Return Values

Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.

Remarks

For any given font, the text metric values in Windows CE will not necessarily match the text metric values in Windows-based desktop platforms.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Wingdi.h   Mgrast.lib, Mgtt.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

GetLastError, GetTextFace, TEXTMETRIC

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.