HRESULT Remove(BOOL fGlobal, DWORD dwCmdStart, DWORD dwCmdNum, DWORD dwFlag);
Removes the specified commands from either the global or application specific commands.
· Returns NOERROR if successful, or one of these error values:
E_INVALIDARG
VCMDERR_INVALIDCHAR
VCMDERR_MENUTOOCOMPLEX
VCMDERR_OUTOFDISK
VCMDERR_OUTOFMEM
VCMDERR_VALUEOUTOFRANGE
fGlobal
[in] If this is TRUE, the commands are removed from the global command set that is used in every application; Global commands are saved across invocations. If this is FALSE it only removes commands for the application. In general, applications should not modify the global command set.
dwCmdStart
[in] 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, this parameter 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 function removes as many commands as possible.
dwFlag
[in] Flag that identifies the nature of dwCmdNum. This parameter can be one of these values:
VCMD_BY_IDENTIFIER
VCMD_BY_POSITION