peekmessage
This function is used to get a message and return immediately.
bool peekmessage(ExMessage *msg, BYTE filter = -1, bool removemsg = true);
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 |
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 EX_DBLCLKS when you create the drawing window.
Examples
None