共用方式為


IAgentCharacter::GetPosition

[Microsoft代理程式從 Windows 7 開始已被取代,而且可能無法在後續版本的 Windows 中使用。]

HRESULT GetPosition(
   long * plLeft,  // address of variable for left edge of character 
   long * plTop    // address of variable for top edge of character 
);

擷取字元的動畫畫面位置。

  • 傳回S_OK,表示作業成功。

plLeft

變數的位址,該變數會以像素為單位接收字元動畫框架左邊緣的螢幕座標,相對於螢幕原點(左上方)。

plTop

變數的位址,該變數會以像素為單位接收字元動畫畫面上邊緣的螢幕座標,相對於螢幕原點(左上方)。

即使字元出現在不規則形狀的區域視窗中,該字元的位置仍以其矩形動畫畫面為基礎。

另請參閱

IAgentCharacter::SetPositionIAgentCharacter::GetSize