A | B | C |  D | E | F |  G | H | I |  J | K | L |  M | N | O |  P | Q | R |  S | T | U |  V | W | X |  Y | Z


The GetTextExtentPoint32 function computes the width and height of the specified string of text. This function supersedes the GetTextExtentPoint function.

Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32A" (ByVal hdc As Long, ByVal lpsz As String, ByVal cbString As Long, lpSize As SIZE) As Long

Operating Systems Supported
Requires Windows NT 3.5(1) or later; Requires Windows 95 or later


Parameter Information
- hdc
Identifies the device context.

- lpString
Points 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
Points to a SIZE structure in which the dimensions of the string are to be returned.

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.

Last update: 07 April 2006