getmessage

This function is used to get a message. If message queue is empty, wait until a message is available for retrieval.

EASYXMSG getmessage(BYTE filter = -1);
void getmessage(EASYXMSG *msg, BYTE filter = -1);

Parameters

msg

A pointer to an EASYXMSG structure that receives a message.

filter

Specify the category of messages to be cleared, the default is -1 to clear all categories. The following values ​​or combinations of values ​​can be used to clear messages of a specified category.

Category identifier Description
EM_MOUSE Mouse message
EM_KEY Key message
EM_CHAR Character message
EM_WINDOW Window message

Return Value

Overload 1: Returns a EASYXMSG structure that holds the message.

Overload 2: None

Remarks

By default, consecutive mouse clicks are recognized as a series of click events. If you want two consecutive mouse clicks to recognize as a double-click event, specify the flag bit EW_DBLCLKS when you create the drawing window.

Examples

See "Mouse operations" in Examples.