getmessage

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

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

Parameters

msg

A pointer to an ExMessage 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
EX_MOUSE Mouse message
EX_KEY Key message
EX_CHAR Character message
EX_WINDOW Window message

Return Value

Overload 1: Returns a ExMessage 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 EX_DBLCLKS when you create the drawing window.

Examples

See "Mouse operations" in Examples.

(贡献者:Krissi  编辑