GetTextMetrics

  BOOL GetTextMetrics(hdc, lpMetrics)    
  HDC hdc; /* device-context handle */
  LPTEXTMETRIC lpMetrics;    

The GetTextMetrics function fills the buffer pointed to by the lpMetrics parameter with the metrics for the currently selected font.

Parameters

hdc

Identifies the device context.

lpMetrics

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

Return Value

The return value is TRUE if the function is successful. Otherwise, it is FALSE.