GetTextExtentPoint32Wrap function

[GetTextExtentPoint32Wrap is available through Windows XP with Service Pack 2 (SP2). It might be altered or unavailable in subsequent versions. It is recommended to use GetTextExtentPoint directly instead.]

Computes the width and height of the specified string of text. This function wraps a call to GetTextExtentPoint.

Syntax

BOOL GetTextExtentPoint32Wrap(
  _In_  HDC     hdc,
  _In_  LPCTSTR lpString,
  _In_  UINT    cbCount,
  _Out_ LPSIZE  lpSize
);

Parameters

hdc [in]

Type: HDC

A handle to the device context.

lpString [in]

Type: LPCTSTR

A pointer to a buffer that contains the text to be drawn. The string does not need to be zero-terminated, since cbCount specifies the length of the string.

cbCount [in]

Type: UINT

The length, in bytes, of the string pointed to by lpString.

lpSize [out]

Type: LPSIZE

When this method returns, contains a pointer to a SIZE structure containing the dimensions of the string, in logical units.

Return value

Type: BOOL

Returns a nonzero value if successful; otherwise, 0.

To get extended error information, call GetLastError.

Remarks

GetTextExtentPoint32Wrap is not exported by name or declared in a public header file. To use it, you must use GetProcAddress and request ordinal 420 from ComCtl32.dll to obtain a function pointer.

For additional remarks, please see GetTextExtentPoint.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
DLL
Comctl32.dll (version 5.81 or later)