void ReplyMessage(lReply)
This function is used to reply to a message sent through the SendMessage function without returning control to the function that called SendMessage.
By calling this function, the window function that receives the message allows the task that called SendMessage to continue to execute as though the task that received the message had returned control. The task that calls ReplyMessage also continues to execute.
Normally a task that calls SendMessage to send a message to another task will not continue executing until the window procedure that Windows calls to receive the message returns. However, if a task that is called to receive a message needs to perform some type of operation that might yield control (such as calling the MessageBox or DialogBox functions), Windows could be placed in a deadlock situation where the sending task needs to execute and process messages but cannot because it is waiting for SendMessage to return. An application can avoid this problem if the task receiving the message calls ReplyMessage before performing any operation that could cause the task to yield.
The ReplyMessage function has no effect if the message was not sent through the SendMessage function or if the message was sent by the same task.
Parameter | Type/Description |
lReply | LONG Specifies the result of the message processing. The possible values depend on the actual message sent. |
None.