Skip to content
Search

WindowsApi:SendMessage

lastmod 2018-08-17created 2016-04-082 edits

A message generated by the PostMessage() function goes into the message queue. Like ordinary messages that occur in Windows, the message is processed by the GetMessage() or PeekMessage() function, so the message is processed only after all routines following the PostMessage() call have run. In other words, even if PostMessage() is called at the beginning of some routine, the generated message is processed by the GetMessage() function after that routine ends.

Synopsis

LRESULT SendMessage( UINT message, WPARAM wParam = 0, LPARAM lParam = 0 );
  • message: Specifies the message to generate, as an unsigned int type.
  • wParam: Specifies additional information about the message, as a WPARAM type. Defaults to 0.
  • lParam: Specifies additional information about the message, as an LPARAM type. Defaults to 0.

The return value is the result after the message has been processed. The routine executed by the generated message can return a result for that routine, and the returned result value becomes the return value of this function.

See also