Anteckning
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
The ITfContextView::GetRangeFromPoint method converts a point, in screen coordinates, to an empty range of text positioned at a corresponding location.
Syntax
HRESULT GetRangeFromPoint(
  [in]  TfEditCookie ec,
  [in]  const POINT  *ppt,
  [in]  DWORD        dwFlags,
  [out] ITfRange     **ppRange
);
Parameters
[in] ec
Specifies the edit cookie with read-only access.
[in] ppt
Specifies the point in screen coordinates.
[in] dwFlags
Specifies the range position to return based upon the screen coordinates of the point to a character bounding box. By default, the range position returned is the character bounding box containing the screen coordinates of the point. If the point is outside a character bounding box, the method returns NULL or TF_E_INVALIDPOINT. Other bit flags for this parameter are as follows.
The bit flags can be combined.
[out] ppRange
Receives a pointer to the ITfRange interface.
Return value
This method can return one of these values.
| Value | Description | 
|---|---|
  | 
The method was successful. | 
  | 
The pptScreen parameter does not cover any document text. | 
  | 
The application has not calculated a text layout. | 
  | 
The specified edit cookie is invalid. | 
Remarks
By default, the method will return a range positioned at 0 for point 1 and TF_E_INVALIDPOINT for point 2. If the dwFlags parameter is set to GXFPF_ROUND_NEAREST, the method returns range position 1 for point 1. If the dwFlags parameter is set to GXFPF_NEAREST then the method returns range position 2 for point 2.
Requirements
| Requirement | Value | 
|---|---|
| Minimum supported client | Windows 2000 Professional [desktop apps | UWP apps] | 
| Minimum supported server | Windows 2000 Server [desktop apps | UWP apps] | 
| Target Platform | Windows | 
| Header | msctf.h | 
| DLL | Msctf.dll | 
| Redistributable | TSF 1.0 on Windows 2000 Professional | 
See also
GXFPF_ROUND_NEAREST