如何在MFC程序运行中,在某一过程把消息放进消息队列中,例如WM_PAINT,WM_SIZE
用::SendMessage吗?

解决方案 »

  1.   

    SendMessage :把消息放进消息队列,并等待消息处理完后返回
    PostMessage:把消息放进消息队列马上返回
      

  2.   

    SendMessage 和 PostMessage
    都可以
      

  3.   

    SendMessage :把消息放进消息队列,并等待消息处理完后返回
    PostMessage:把消息放进消息队列马上返回
    如此说不right看看msdn
    The SendMessage member function calls the window procedure directly and does not return until that window procedure has processed the message. This is in contrast to the PostMessage member function, which places the message into the window's message queue and returns immediately
      

  4.   

    SendMessage是全局函数吗?
    如何让指定的类处理我们发的消息,也就是参数有什么要求,MSDN没说清楚