BOOL GetTextExtentPoint32( HDC hdc, // handle to device context LPCTSTR lpString, // pointer to text string int cbString, // number of characters in string LPSIZE lpSize // pointer to structure for string size );
Parameters hdc Handle to the device context. lpString Pointer to the string of text. The string does not need to be zero-terminated, since cbString specifies the length of the string. cbString Specifies the number of characters in the string. lpSize Pointer to a SIZE structure in which the dimensions of the string are to be returned.
SIZE The SIZE structure specifies the width and height of a rectangle. typedef struct tagSIZE { // siz LONG cx; LONG cy; } SIZE;
Members cx Specifies the rectangle's width. cy Specifies the rectangle's height.
HDC hdc, // handle to device context
LPCTSTR lpString, // pointer to text string
int cbString, // number of characters in string
LPSIZE lpSize // pointer to structure for string size
);
Parameters
hdc
Handle to the device context.
lpString
Pointer to the string of text. The string does not need to be zero-terminated, since cbString specifies the length of the string.
cbString
Specifies the number of characters in the string.
lpSize
Pointer to a SIZE structure in which the dimensions of the string are to be returned.
The SIZE structure specifies the width and height of a rectangle. typedef struct tagSIZE { // siz
LONG cx;
LONG cy;
} SIZE;
Members
cx
Specifies the rectangle's width.
cy
Specifies the rectangle's height.