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 receives 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 do not necessarily match the text metric values on Windows-based desktop platforms.

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Windows.h.
Link Library: Coredll.lib.

See Also

GetTextFace | TEXTMETRIC

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.