|
Peeks at or gets a message from the queue. If remove is TRUE, the message will be removed. It does not wait for a message to be available; it returns 0 immediately if there are no messages in the specified range. Don't use this function unless really need to. -
Parameters:
-
ptr_queue
|
A pointer to the initialized Queue object |
remove
|
If TRUE, the message will be removed from the message queue |
min
|
Specifies the lowest message value to be retrieved, as an integer |
max
|
Specifies the highest message value to be retrieved, as an integer |
-
Returns:
-
A pointer to the Message if one is in the queue, otherwise 0
#include <cybiko.h>
...
struct module_t main_module;
struct Message* ptr_message;
...
init_module( &main_module );
...
while( ptr_message = Queue_peek_message( main_module.m_process,
TRUE,
MSG_KEYDOWN,
MSG_KEYDOWN ) )
{
Message_delete( ptr_message );
}
...
-
See also:
-
Queue_get_message.
|