ITextServices::OnTxSetCursor method (textserv.h)
Notifies the text services object to set the cursor.
HRESULT OnTxSetCursor( DWORD dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hdcDraw, HDC hicTargetDev, LPCRECT lprcClient, INT x, INT y );
Draw aspect can be one of the following values.
Information for drawing optimizations.
The target device.
Rendering device context.
Target information context.
The control's client rectangle. The coordinates of the rectangle are in client coordinates of the containing window. NULL is a legal value.
x position of cursor, in the client coordinates of the containing window.
y position of cursor, in the client coordinates of the containing window.
If the method succeeds, the return value is S_OK.
If the method fails, the return value is the following HRESULT code. For more information on COM error codes, see Error Handling in COM.
||One or more illegal parameters.|
The text services object may remeasure as a result of this call to determine the correct cursor. The correct cursor is set through TxSetCursor.
The lprcClient parameter is the client rectangle of the view of the control over which the mouse cursor is positioned. The lprcClient parameter is in device coordinates of the containing window in the same way the WM_SIZE message is. This may not be the view that was rendered last. Furthermore, if the control is in-place active, this may not be the current active view . As a consequence, the text services object should check this rectangle against its current cache's value and determine whether recalculating the lines is necessary or not. The zoom factor should be included in this computation. For a discussion of the zoom factor, see TxGetExtent.
This method should be called only for screen views of the control. Therefore the device context (DC) is not passed in, but should be assumed to be a screen DC.
For more information, see the Remarks in ITextServices::TxDraw.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|