Export (0) Print
Expand All

ITextHost::TxGetExtent method

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 codeDescription
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

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Textserv.h

DLL

Msftedit.dll

See also

ITextHost
Conceptual
Windowless Rich Edit Controls
Other Resources
SIZE

 

 

Community Additions

ADD
Show:
© 2014 Microsoft