SendMessage(HWND_BROADCAST, …) hangs

后端 未结 4 1412
鱼传尺愫
鱼传尺愫 2020-12-14 19:11

When I use theSendMessage function with HWND_BROADCAST, the application hangs up. There is no response from the application for long time.

4条回答
  •  死守一世寂寞
    2020-12-14 20:00

    This is because when SendMessage is called with HWND_BROADCAST, it first enumerates all the windows available and then calls SendMessage for each of those windows. SendMessage will not return until the window has finished processing the message. If a single window is taking a long time to process the message, the entire call will be delayed.

提交回复
热议问题