GetTextMetrics

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

BOOL GetTextMetrics(

HDC hdc, // handle of device context
LPTEXTMETRIC lptm // address of text metrics structure
);  

Parameters

hdc

Identifies the device context.

lptm

Points to the TEXTMETRIC structure that is to receive the metrics.

Return Values

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

See Also

GetTextAlign, GetTextExtentPoint32, GetTextFace, SetTextJustification, TEXTMETRIC