ON_COMMAND_EX

 

This macro maps a command message to an extended command-handler member function.

Syntax

ON_COMMAND_EX(
   id,
   memberFxn
);

Parameters

  • id
    The command ID.

  • memberFxn
    The name of the message-handler function to which the command is mapped.

Remarks

An extended form of command message handlers is available for advanced uses. The ON_COMMAND_EX macro is used for such message handlers, and it provides a superset of the ON_COMMAND functionality. Extended command-handler member functions take a single parameter, a UINT containing the command ID, and return a BOOL. The return value should be TRUE to indicate that the command has been handled; otherwise routing will continue to other command target objects.

For more information, see Technical Note TN006: Message Maps.

Requirements

Header file: afxmsg_.h

See Also

ON_COMMAND
TN006: Message Maps