I want to hide an external application, ie. not the current application. I want to give the title of the application and it will be hidden. How can I do this programmatically?
我想隐藏外部应用程序,即。不是当前的申请。我想给出应用程序的标题,它将被隐藏。我该如何以编程方式执行此操作?
3 个解决方案
#1
In general terms, you could call FindWindow
to get the HWND of the window in question, then ShowWindow
with SW_HIDE
to hide the window.
一般而言,您可以调用FindWindow来获取相关窗口的HWND,然后使用SW_HIDE调用ShowWindow来隐藏窗口。
#2
You need to get a handle to the window (which you can do using FindWindow()). Then you need to call ShowWindow() and set it's shown state to hidden.
你需要获得窗口的句柄(你可以使用FindWindow())。然后你需要调用ShowWindow()并将它显示的状态设置为隐藏。
#3
ShowWindow(FindWindow(NULL, "WINDOW TITLE"), SW_HIDE);
#1
In general terms, you could call FindWindow
to get the HWND of the window in question, then ShowWindow
with SW_HIDE
to hide the window.
一般而言,您可以调用FindWindow来获取相关窗口的HWND,然后使用SW_HIDE调用ShowWindow来隐藏窗口。
#2
You need to get a handle to the window (which you can do using FindWindow()). Then you need to call ShowWindow() and set it's shown state to hidden.
你需要获得窗口的句柄(你可以使用FindWindow())。然后你需要调用ShowWindow()并将它显示的状态设置为隐藏。
#3
ShowWindow(FindWindow(NULL, "WINDOW TITLE"), SW_HIDE);