I am using Windows api PostThreadMessage to add the message in one thread and GetMessage the message to retrieve the message .From MSDN docs it is clear that Message Queue is limited to 10,000 message . But I am unable to test it. As I want to test it before 5,000 message . I have not find any API to check the message Queue .
What I tried: res = PostThreadMessage . If ret is 0 i.e post thread fail and using GetLastError() it get the error message .
But I want to check before the PostThreadMessage that if Message Queue Empty or full ?
If it full how to Empty the Message Queue.