问题描述
限时送ChatGPT账号..当一个进程从进程内部开始时,是否可以禁用鼠标反馈光标?
Is it possible to disable the mouse feedback cursor when a process begins from within the process?
我知道您可以在创建进程时使用 STARTF_FORCEOFFFEEDBACK
标志,并且当进程显示窗口时反馈光标将关闭.但是,我无法控制创建我的进程的代码,我的进程仅用于后台计算,因此不显示窗口.
I know you can use the STARTF_FORCEOFFFEEDBACK
flag when creating the process, and that the feedback cursor will turn off when the process displays a window. However, I do not have control over the code that creates my process and my process is only used for background computation, so it does not display a window.
除了创建一个临时窗口并立即销毁它之外,有人知道我可以进行任何系统调用来关闭反馈光标吗?
Anybody know of any system calls I can make to turn off the feedback cursor, other than creating a temporary window and immediately destroying it?
推荐答案
我能够通过向主线程发布一条虚拟消息并立即接收消息来关闭反馈光标.如果其他人遇到同样的问题,这里是代码:
I was able to turn off the feedback cursor by posting a dummy message to the main thread and immediately receiving the message. Here's the code if anybody else encounters the same problem:
MSG msg;
PostMessage(NULL,WM_NULL,0,0);
GetMessage(&msg,NULL,0,0);
这篇关于关闭窗口中的过程反馈光标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论