IFont::QueryTextMetrics method (ocidl.h)

Fills a caller-allocated structure with information about the font.

Syntax

HRESULT QueryTextMetrics(
  [out] TEXTMETRICOLE *pTM
);

Parameters

[out] pTM

Pointer to the caller-allocated structure that receives the font information. The TEXTMETRICOLE structure is defined as a TEXTMETRICW structure.

Return value

The method supports the standard return value E_UNEXPECTED, as well as the following values.

Return code Description
S_OK
The text metrics were returned successfully.
E_POINTER
The address in the ptm parameter is not valid. For example, it may be NULL.

Remarks

Notes to Implementers

E_NOTIMPL is not a valid return value. Font objects must always provide their font information through this call unless other errors occur.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header ocidl.h

See also

IFont