TextRange_MoveEndpointByUnit 函数 (uiautomationcoreapi.h)

注意 此函数已弃用。 客户端应用程序应改用 Microsoft UI 自动化 组件对象模型 (COM) 接口。
 
将范围内的终结点移动指定的单位数。

语法

HRESULT TextRange_MoveEndpointByUnit(
  [in]  HUIATEXTRANGE            hobj,
  [in]  TextPatternRangeEndpoint endpoint,
  [in]  TextUnit                 unit,
  [in]  int                      count,
  [out] int                      *pRetVal
);

参数

[in] hobj

类型: HUIATEXTRANGE

文本范围对象。

[in] endpoint

类型: TextPatternRangeEndpoint

要 (开始或结束) 移动的终结点。

[in] unit

类型: TextUnit

单位,例如 Page、Line 或 Word。

[in] count

类型: int

要移动的单元的数量。 正值将范围向前移动;负值将其向后移动。

[out] pRetVal

类型: int*

当此函数返回时,包含终结点实际移动的单位数。 此参数未经初始化即被传递。

返回值

类型: HRESULT

如果成功,则返回S_OK,否则返回错误值。

要求

要求
最低受支持的客户端 Windows XP [仅限桌面应用]
最低受支持的服务器 Windows Server 2003 [仅限桌面应用]
目标平台 Windows
标头 uiautomationcoreapi.h
Library Uiautomationcore.lib
DLL Uiautomationcore.dll