Home > Software engineering >  The problem of SendMessage
The problem of SendMessage

Time:11-16


SendMessage why can sent to the window of the other processes, and if another process window function is called, has not yet been performed, then send the process window SendMessage, by this time the process will perform two window function at the same time, the letter or the process such as the current window function performs the transmit window function to perform SendMessage

CodePudding user response:

If the specified window was created by the calling thread, the window procedure is called immediately as a subroutine. If the specified window was created by a company's thread, the system switches to that thread and calls the appropriate window procedure. The Messages sent between the threads are processed only when the identifiers thread executes the message retrieval code. The sending thread is blocked until the identifiers thread the processes the message.

CodePudding user response:

 
InSendMessage
The InSendMessage function determines been The current window procedure is processing a message that was sent from another thread (in The same process or a company's process) by a call to The SendMessage function.

BOOL InSendMessage (VOID);

The Parameters
This function has no parameters.

The Return Values
If the window procedure is processing a message sent to it from another thread using the SendMessage function, the return value is nonzero.

If the window procedure is not processing a message sent to it from another thread using the SendMessage function, the return value is zero.

CodePudding user response:

The SendMessage function sends The specified message to a window or Windows. It calls The window procedure for The specified window and does not return until The window procedure has processed The message.
The PostMessage function places (posts) a message in The message queue associated with The thread that created The specified window and returns without waiting for The thread to process The message.

CodePudding user response:

The
reference 3 floor schlafenhamster response:
 
InSendMessage
The InSendMessage function determines been The current window procedure is processing a message that was sent from another thread (in The same process or a company's process) by a call to The SendMessage function.

BOOL InSendMessage (VOID);

The Parameters
This function has no parameters.

The Return Values
If the window procedure is processing a message sent to it from another thread using the SendMessage function, the return value is nonzero.

If the window procedure is not processing a message sent to it from another thread using the SendMessage function, the return value is zero.


Can, this reply, thanks brother
  • Related