To implement this, we need to use two new macros: ON_COMMAND_RANGE and ON_UPDATE_COMMAND_UI_RANGE, which correspond to ON_COMMAND and ON_UPDATE_COMMAND_UI respectively. The formats of the two macros are:
ON_COMMAND_RANGE(start ID, end ID, member function name)
ON_UPDATE_COMMAND_UI_RANGE(start ID, end ID, member function name)
The formats of the corresponding member functions are: