共用方式為


GetLocation method

Gets the horizontal and vertical coordinates, in pixels, of the location of the insertion point.

Syntax

HRESULT retVal = object.GetLocation(pPoint, fTranslate);

Parameters

  • pPoint [out]
    Type: POINT

    A pointer to a variable of type POINT that receives the coordinates of the insertion point.

  • fTranslate [in]
    Type: BOOL

    A BOOL value that specifies TRUE if the coordinates of the insertion point are given from a global frame of reference, or FALSE if the coordinates are given from the frame of reference of the flow layout element containing the insertion point.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.