請問各位高手SenMessage和PostMessage有什麽區別啊?在線等待!!!

解决方案 »

  1.   

    postmessage 产生消息放入队列中,等待主线程 get/dispatch
    sendmessage 产生消息,找到对应处理函数,调用后返回。
      

  2.   

    PostMessage发送消息,不等消息处理完成立刻返回
    SendMessage发送消息,等消息完成才返回
      

  3.   

    SengMessage是线程阻塞方式。调用SendMessage后,主线程就停止,直到SendMessage函数有返回后才继续执行下去。
    PostMessage是非阻塞方式。它只是把消息放到消息队列中,并不等待的返回,主线程继续向下执行。
      

  4.   

    http://search.csdn.net/Expert/topic/1061/1061815.xml?temp=.4516413
      

  5.   

    SendMessage:
    function sends the specified message to a window or windows. The function calls the window procedure for the specified window and does not return until the window procedure has processed the message. 处理后返回.
    PostMessage: function, in contrast, posts a message to a thread's message queue and returns immediately. 
    放到队列后就返回.
    可相当于同步与异步处理的区别