都是获得队列中的消息 有什么不一样的马

解决方案 »

  1.   

    The PeekMessage function dispatches incoming sent messages, checks the thread message queue for a posted message, and retrieves the message (if any exist).The GetMessage function retrieves a message from the calling thread's message queue. The function dispatches incoming sent messages until a posted message is available for retrieval---msdn
      

  2.   

    Unlike GetMessage, the PeekMessage function does not wait for a message to be posted before returning.PeekMessage 有没有消息 都会立刻返回
      

  3.   

    没怎么用过,按  property1 的意思是说 阻塞和不阻塞的差别。
      

  4.   

    在WINDOWS中消息过滤可用GETMESSAGE和PEEKMESSGE来实现。但二者略有不同,GETMESSGE直到取到消息才返回,而PEEKMESSAGE则不管取到与否都立即返回。
      

  5.   

    另外还有一点, PeekMessage()可以有一个参数决定是否从消息队列中删除消息。