ON_COMMAND_RANGE

ON_COMMAND_RANGE( id1, id2, memberFxn )

Parameters

id1

Command ID at the beginning of a contiguous range of command IDs.

id2

Command ID at the end of a contiguous range of command IDs.

memberFxn

The name of the message-handler function to which the commands are mapped.

Remarks

Use this macro to map a contiguous range of command IDs to a single message handler function. The range of IDs starts with id1 and ends with id2.

Use ON_COMMAND_RANGE to map a range of command IDs to one member function. Use ON_COMMAND to map a single command to a member function. Only one message-map entry can match a given command ID. That is, you can’t map a command to more than one handler. For more information on mapping message ranges, see Handlers for Message-Map Ranges in Visual C++ Programmer’s Guide.

ClassWizard does not support message map ranges, so you must place the macro yourself. Be sure to put it outside the message map //{{AFX_MSG_MAP delimiters.

See Also   ON_UPDATE_COMMAND_UI_RANGE, ON_CONTROL_RANGE, ON_COMMAND