Defining external commands

 

Several commands are available with Imagenation. For a list, click Command IDs. You can also add other, external commands for use with Imagenation.

To create an external command, and place it in the user interface:

1. Use IN_AddExternalCommandEx to add the command and its user interface text, including its name, Status Bar message, and ToolTip.

2. Set up the NotifyMenuIntercept notification to receive an advise when a user selects a command in Imagenation.

3. Set IN_InterceptMenuAction to TRUE to intercept the command.

4. Add the new command to an Imagenation menu with IN_AddMenuItem.

5. Refresh the user interface by using IN_RefreshMenus.

The external command is now in the user interface. The client application is responsible for enabling and disabling the command with IN_SetMenuStatus, and for carrying out an action when the command is selected.

You can add an external command to a button bar. For topics that deal with buttons, see Defining buttons and button bars. (Note that you can also use IN_AddExternalCommand to add a command that will get added to a button bar only, and not to a menu.)

See also

Intercepting commands

Defining menu bars

Controlling notifications and queries