在Windows中在控制台上设置焦点? [英] Set focus on console in Windows?
本文介绍了在Windows中在控制台上设置焦点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以在Windows中设置控制台应用程序的焦点? SetFocus 看起来很有前途,但它需要一个HWND我不知道控制台应用程序是否有一个。
Is it possible to set focus on a console app in Windows? SetFocus looks promising, but it needs an HWND and I don't know if console apps even have one.
推荐答案
使用 GetConsoleWindow 函数。
这篇关于在Windows中在控制台上设置焦点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文