IVCmdMenu::Remove
This method removes the specified commands from the voice menu.
Syntax
HRESULT Remove( DWORD dwCmdStart, DWORD dwCmdNum, DWORD dwFlag);
Parameters
- dwCmdStart
- [in] Specifies the number of the first command in the menu to remove. Command positions are sequential, starting with 1 for the first command on the menu. If dwFlag is the VCMD_BY_IDENTIFIER value, dwCmdStart is ignored.
- dwCmdNum
- [in] Number of commands to remove or the identifier of the commands, depending on the value of dwFlag. If the sum of dwCmdStart and dwCmdNum exceeds the total number of commands in the menu, the method removes as many commands as possible.
- dwFlag
- [in] Specifies the nature of dwCmdNum. It is one of the following values:
- VCMD_BY_IDENTIFIER
- The dwCmdNum parameter is the identifier of the command.
- VCMD_BY_POSITION
- The dwCmdNum parameter is the position in the list of commands.
Return Values
- NOERROR
- The method successfully removed the specified commands.
- E_INVALIDARG
- The argument is invalid.
- VCMDERR_INVALIDCHAR
- There is an invalid character in the voice menu.
- VCMDERR_MENUTOOCOMPLEX
- The menu is too complex to use.
- VCMDERR_OUTOFDISK
- No disk space is left to write information.
- VCMDERR_OUTOFMEM
- There is no more memory.
- VCMDERR_VALUEOUTOFRANGE
- The value is out of range.
Remarks
For best results, deactivate the voice menu before calling Remove. Otherwise, the menu must be deactivated, recompiled, and reactivated before Remove returns. If the menu is already deactivated when Remove is called, the menu is not recompiled until the application activates it again.