GetTextMetrics

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

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

Syntax

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 Value

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

Remarks

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

Requirements

Header windows.h
Library coredll.lib
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later

See Also

Reference

GetTextFace
TEXTMETRIC