ITextHost::TxGetExtent method (textserv.h)

Requests the native size of the control in HIMETRIC.

Syntax

HRESULT TxGetExtent(
  LPSIZEL lpExtent
);

Parameters

lpExtent

Type: LPSIZEL

The size of the control in HIMETRIC, that is, where the unit is .01 millimeter.

Return value

Type: HRESULT

Return S_OK if the method succeeds.

Return the following COM error code if the method fails. For more information on COM error codes, see Error Handling in COM.

Return code Description
E_NOTIMPL
Not implemented.

Remarks

This method is used by the text services object to implement zooming. The text services object derives the zoom factor from the ratio between the himetric and device pixel extent of the client rectangle. Each HIMETRIC unit corresponds to 0.01 millimeter.

[vertical zoom factor] = [pixel height of the client rect] * 2540 / [HIMETRIC vertical extent] * [pixel per vertical inch (from device context)]

If the vertical and horizontal zoom factors are not the same, the text services object can ignore the horizontal zoom factor and assume it is the same as the vertical one.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header textserv.h
DLL Msftedit.dll

See also

Conceptual

ITextHost

Other Resources

SIZE

Windowless Rich Edit Controls