void ReplyMessage(lResult) | |||||
LRESULT lResult; | /* message-dependent reply | */ |
The ReplyMessage function is used to reply to a message sent through the SendMessage function without returning control to the function that called SendMessage.
lResult
Specifies the result of the message processing. The possible values depend on the message sent.
This function does not return a value.
By calling this function, the window procedure that receives the message allows the task that called SendMessage to continue to run as though the task that received the message had returned control. The task that calls ReplyMessage also continues to run.
Usually, a task that calls SendMessage to send a message to another task will not continue running until the window procedure that Windows calls to receive the message returns. However, if a task that is called to receive a message must perform some type of operation that might yield control (such as calling the MessageBox or DialogBox function), Windows could be deadlocked, as when the sending task must run 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.