gpt4 book ai didi

C - WinAPI - 向线程发送消息并等待它

转载 作者:太空宇宙 更新时间:2023-11-04 02:03:13 25 4
gpt4 key购买 nike

我想在 WinAPI 中发送一条消息到在其他线程中创建的窗口,然后等待处理这条消息。

这可能吗?提前致谢。

最佳答案

使用 SendMessage() 向窗口发送消息。

SendMessage() 阻塞调用线程,直到消息被目标窗口的消息调度程序处理。

来自 SendMessage()'s documentation :

Sends the specified message to a window or windows. The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

关于C - WinAPI - 向线程发送消息并等待它,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23982448/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com