IUIAutomationTextRange::GetEnclosingElement 方法 (uiautomationclient.h)

傳回括文字範圍的最內部 使用者介面自動化 專案。

語法

HRESULT GetEnclosingElement(
  [out, retval] IUIAutomationElement **enclosingElement
);

參數

[out, retval] enclosingElement

類型: IUIAutomationElement**

接收封入專案的指標,這通常是提供文字範圍的文字提供者。 不過,如果文字提供者支持數據表或超連結等子元素,封入專案可能是文字提供者的子系。

傳回值

類型: HRESULT

如果此方法成功,則會傳回 S_OK。 否則,它會傳回 HRESULT 錯誤碼。

規格需求

需求
最低支援的用戶端 Windows 7、Windows Vista sp2 和 Platform Update for Windows Vista、Windows XP with SP3 和 Platform Update for Windows Vista [僅限桌面應用程式]
最低支援的伺服器 Windows Server 2008 R2、Windows Server 2008 SP2 和 Platform Update for Windows Server 2008、Windows Server 2003 SP2 和 Platform Update for Windows Server 2008 [僅限桌面應用程式]
目標平台 Windows
標頭 uiautomationclient.h (包含 UIAutomation.h)

另請參閱

IUIAutomationTextRange

使用者介面自動化 文字內容的支援