IAgentCharacter::SetPosition

[Microsoft Agent is deprecated as of Windows 7, and may be unavailable in subsequent versions of Windows.]

HRESULT SetPosition(
   long lLeft,  // screen coordinate of the left edge of character 
   long lTop    // screen coordinate of the top edge of character 
);

Sets the position of the character's animation frame.

  • Returns S_OK to indicate the operation was successful.

lLeft

Screen coordinate of the character animation frame's left edge in pixels, relative to the screen origin (upper left).

lTop

Screen coordinate of the character animation frame's top edge in pixels, relative to the screen origin (upper left).

This property's setting applies to all clients of the character. Even though the character appears in an irregularly shaped region window, the location of the character is based on its rectangular animation frame.

Note

Unlike the MoveTo method, this function is not queued.

 

See Also

IAgentCharacter::GetPosition