pDispatchAction
pDispatchAction
Cause the next action to be processed.
Syntax
pDispatchAction ( inout vlStatus,
in vlAction,
in vlMessageType,
in vlProcessId,
in vlWindowName )
Parameters
vlStatus | The returned status from pDispatchAction. |
vlAction | The name of the action to be dispatched. |
vlMessageType | The type of dispatching to be done (blank, “#BROADCAST”, “#NEXT”, “#PREVIOUS”, “#TOCHILDREN”, or “#TOPARENT”) |
vlProcessId | The process id of the target process. |
vlWindowName | The window name for the target process. |
Comments
This program is called to send an action to a specific process or to all processes. A process can be identified by process id (vlProcessId is not zero) or by window name (vlProcessId is zero).
When vlMessageType is blank, the target process is made the current process (i.e. the window becomes the current window) and the action is sent to the process using pSendAction.
When vlMessageType is “#BROADCAST”, the action is sent to each active process, starting at the last process in the process list.
The “#NEXT” and “#PREVIOUS” options send the action to the next or previous process in the process list. For example, assume the accelerator Ctrl+F3 is mapped to an action called “MOVETONEXTWINDOW” and means that control (focus) should be switched to the next window (relative to the current window). The command
pDispatchAction (vlStatus, “ENTERWINDOW”, “#NEXT”, 0, “”)
causes the required focus switch. This command could also be defined (in EventAction) as a “callback” for this accelerator key event.
The “#TOCHILDREN” option causes the action to be dispatched to all processes that are children of the current process. For example, if a main application window receives the “EXIT” action, it would send the same action to all its children to ensure they “exit” as well.
The “#TOPARENT” option causes the action to be dispatched to the process that is the parent of the current process. For example, if a window receives the “EXITAPPLICATION” action, it would send it to its parent. If the parent is the main application window, it handles the action.