This function computes the width and height of the specified string of text.
BOOL GetTextExtentPoint( HDC hdc, LPCTSTR lpString, int cbString, LPSIZE lpSize );
[in] Handle to the device context (DC).
[in] Long pointer to the string of text. The string does not need to be zero-terminated because cbString specifies the length of the string.
[in] Integer that specifies the number of characters in the string.
[out] Long pointer to a SIZE structure that receives the dimensions of the string.
Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.
The GetTextExtentPoint function uses the currently selected font to compute the dimensions of the string. GetTextExtentPoint computes the width and height, in logical units, without considering any clipping.
Because some devices kern characters, the sum of the extents of the characters in a string does not always equal to the extent of the string.
The GetTextExtentPoint function is identical to the GetTextExtentPoint32 function.