ITextServices interface
Applies to: desktop apps only
Extends the Text Object Model (TOM) to provide extra functionality for windowless operation.
Members
The ITextServices interface inherits from the IUnknown interface. ITextServices also has these types of members:
Methods
The ITextServices interface has these methods.
| Method | Description |
|---|---|
| OnTxInPlaceActivate |
Notifies the text services object that this control is in-place active. |
| OnTxInPlaceDeactivate |
Notifies the text services object that this control is no longer in-place active. |
| OnTxPropertyBitsChange |
Sets properties (represented by bits) for the control. |
| OnTxSetCursor |
Notifies the text services object to set the cursor. |
| OnTxUIActivate |
Notifies the text services object that the control is now UI active. |
| OnTxUIDeactivate |
Notifies the text services object that the control is no longer UI active. |
| TxDraw |
Draws the text services object. |
| TxGetBaseLinePos |
Gets the base line position of the first visible line, in pixels, relative to the text services client rectangle. This permits aligning controls on their base lines. |
| TxGetCachedSize |
Gets the cached drawing size (if any) that text services is using. Typically, this will be the size of the last client rectangle used in TxDraw, OnTxSetCursor, and so forth, although it is not guaranteed to be. |
| TxGetCurTargetX |
Gets the target x position, that is, the current horizontal position of the caret. |
| TxGetDropTarget |
Gets the drop target for the text control. |
| TxGetHScroll |
Gets the horizontal scroll bar information. |
| TxGetNaturalSize |
Enables a control to be resized so it fits its content appropriately. |
| TxGetText |
Gets all of the Unicode plain text in the control as a BSTR. |
| TxGetVScroll |
Gets vertical scroll bar state information. |
| TxQueryHitPoint |
Tests whether a specified point is within the rectangle of the text services object. |
| TxSendMessage |
Used by the window host to forward messages sent from its window to the text services object. |
| TxSetText |
Sets all of the text in the control. |
Remarks
In conjunction with the ITextHost interface, ITextServices provides the means by which a rich edit control can be used without creating a window.
When to Implement
Applications do not implement the ITextServices interface.
When to Use
Applications can call the CreateTextServices function to create a text services object. To retrieve an ITextServices pointer, call QueryInterface on the private IUnknown pointer returned by CreateTextServices. You can then call the ITextServices methods to send messages to the text services object.
Requirements
|
Minimum supported client | Windows 2000 Professional |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 3/6/2012