IAgentCharacterEx::ShowPopupMenu

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

HRESULT ShowPopupMenu(
   short x,  // x-coordinate of pop-up menu
   short y   // y-coordinate of pop-up menu
);

Displays the pop-up menu for the character.

  • Returns S_OK to indicate the operation was successful.

x

The x-coordinate of the character's pop-up menu in pixels, relative to the screen origin (upper left).

y

The y-coordinate of the character's pop-up menu in pixels, relative to the screen origin (upper left).

When you set IAgentCharacterEx::SetAutoPopupMenu to False, the server no longer automatically displays the menu when the character or its taskbar icon is right-clicked. You can use this method to display the menu.

The menu displays until the user selects a command or displays another menu. Only one pop-up menu can be displayed at a time; therefore, calls to this method will cancel (remove) the former menu.

This method should only be called when your client application is the active client of the character; otherwise it fails.

IAgentCharacterEx::SetAutoPopupMenu