ISolpackApp::AddGameCommand Method
Adds a custom command to be made available to the user.
Syntax:
HRESULT AddGameCommand(
long lID,
BSTR bstrText,
BSTR bstrHelpText
);
Parameters:
- lID
- A game-defined long integer value specifying the ID representing the command.
- bstrText
- A string value containing the name of the custom command.
- bstrHelpText
- A string value containing help information corresponding to command.
Return Value:
Returns S_OK if successful, or an error value otherwise.
Remarks:
In some games, moves cannot be adequately represented by drag operations and clicks. Use this method to define a custom
command for a game. By default, the command is enabled; call the ISolpackApp::EnableCommand
method to change its enabled state.
Solitaire Pack displays the command to the user as a hyperlink within the game window. When the user hovers over the
command, the help text is displayed as a tooltip. When the user clicks the link, the game's HandleCommand
method is called.
|