h6. [[WindowManager]] h6(. » [[WindowManager SWI Calls|SWI Calls]] h6((. » Wimp_SendMessage h2. Wimp_SendMessage h5. (SWI &400E7) |_<^. Entry | | |<^. R0 |<^. [[Reason Codes|Reason Code]] | |<^. R1 |<^. Pointer to message block | |/4<^. R2 |<^. Destination task handle, or | |<^. Destination window handle, or | |<^. – 2 for creator of icon handle in R3, or | |<^. 0 to broadcast to all (including self) | |<^. R3 |<^. Icon handle (if R2 = -2) | |_<^. Exit | | |<^. R0 |<^. Corrupt | |<^. R2 |<^. Handle of destination task (if not broadcast) | |<^. Block |<^. Updated | h4. Use The purpose of this call is to send a message either to a particular task or to all tasks. h4. Notes All messages are passed around the Wimp using this call. Tasks are notified of incoming messages via [[Wimp_Poll|Wimp_Poll]]. The type of message to be sent is dependant on the reason code value. The message block in R1 should be in the format specified by the particular [[Reason Codes|Reason Code]] being used in R0. When replaying to a message, R2 should be the task handle of the original message. Reason code values of 1 to 12 can be used to inform another task about a window, mouse, icon etc... Reason codes of 17 to 19 are user messages and are the most common type of message to send. * [[User_Message|User_Message]] (reason code 17) is used to inform a task of something. * [[User_Message_Recorded]] (reason code 18) is used to inform a task of something but requires a message of acknowledgement in return. If no acknowledged message is received, the Wimp will send the message back to the originator (unless the message's type is not in the list of message types that the application accepts). * [[User_Message_Acknowledge|User_Message_Acknowledge]] is reason code 19 is used to reply back to a task that sent a User_Message_Recorded message. h4. See also * [[Reason Codes|Reason Codes]] * [[User_Message|User_Message]] * [[User_Message_Recorded]] * [[User_Message_Acknowledge|User_Message_Acknowledge]] * [[Wimp_Poll|Wimp_Poll]]