Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ITextStoreACP2::GetACPFromPoint method

Converts a point in screen coordinates to an application character position.

Syntax


HRESULT GetACPFromPoint(
  [in]        TsViewCookie vcView,
  [in]  const POINT        *ptScreen,
  [in]        DWORD        dwFlags,
  [out]       LONG         *pacp
);

Parameters

vcView [in]

Specifies the context view.

ptScreen [in]

Pointer to the POINT structure with the screen coordinates of the point.

dwFlags [in]

Specifies the character position to return based upon the screen coordinates of the point relative to a character bounding box. By default, the character 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.

ValueMeaning
GXFPF_ROUND_NEAREST

If the screen coordinates of the point are contained in a character bounding box, the character position returned is the bounding edge closest to the screen coordinates of the point.

GXFPF_NEAREST

If the screen coordinates of the point are not contained in a character bounding box, the closest character position is returned.

 

pacp [out]

Receives the character position that corresponds to the screen coordinates of the point.

Return value

This method can return one of these values.

ValueDescription
S_OK

The method was successful.

TS_E_INVALIDPOINT

The ptScreen parameter is not within the bounding box of any character.

TS_E_NOLAYOUT

The application has not calculated a text layout.

 

Requirements

Minimum supported client

Windows 8 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 [desktop apps | Windows Store apps]

Header

Textstor.h

IDL

Textstor.idl

DLL

Msctf.dll

See also

ITextStoreACP2
GXFPF_* Constants
ITfContextOwner::GetACPFromPoint
ITfContextView::GetRangeFromPoint
TsViewCookie
Manager Return Values

 

 

Show:
© 2017 Microsoft