C28601

warning C28601: Avoid blocking on HWND_BROADCAST

This warning indicates that the application called SendMessage with the HWND_BROADCAST flag, which blocks the thread until all the windows to which this message was broadcast respond. However, if there is another window that is not responding, the current thread will also be blocked.

To fix this, use PostMessage instead, so that it is not a blocking call. Alternatively, avoid the use of HWND_BROADCAST to direct the message to a particular window.

Example

The following call could cause the process to stop responding.

SendMessage(HWND_BROADCAST, ... );