peekmessage

This function is used to get a message and return immediately.

bool peekmessage(EASYXMSG *msg, BYTE filter = -1, bool removemsg = true);

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

removemsg

Specifies whether to remove the message from the queue after processing by peekmessage.

Return Value

If a message is available, the return value is true.

If no messages are available, the return value is false.

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

None