应用"如何从&QUOT隐藏窗口;标签在任务管理器? [英] How to hide window from "Applications" tab in task manager?

查看:134
本文介绍了应用"如何从&QUOT隐藏窗口;标签在任务管理器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个关于CreateWindowEx函数问题。我有2个窗户,一主一和弹出之一。我想要一个弹出窗口去隐藏无处不在。它目前不会显示在任务栏,它是不是在ALT + TAB菜单偶可见。然而,它是在任务管理器应用程序选项卡上可见。什么旗,我需要在函数CreateWindowEx使用从那里隐藏我的弹出窗口?

I have question regarding the CreateWindowEx function. I have 2 windows, a main one and a popup one. I want a popup window to hide everywhere. It is currently not displayed in taskbar and it is not even visible in alt+tab menu. However it is visible on "Applications" tab in task manager. What flags do I need to use in CreateWindowEx to hide my popup window from there?

当前code:

hHistoryWindow = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_NOACTIVATE | WS_EX_LAYERED, szAppName, L"HistoryWindow",  WS_EX_TOPMOST | WS_POPUP, WIDTH, TOP, width, height, NULL, NULL, hInstance, NULL);

我也想问,我是否需要使用的DestroyWindow()函数之前释放从静态窗口中的位图资源?我设置图像静态窗口是这样的:

I also wanted to ask, whether I need to release a bitmap resource from "static" window before using DestroyWindow() function? I set image to a "static" window this way:

SendMessage (hStatic, STM_SETIMAGE, (WPARAM)IMAGE_BITMAP, (LPARAM)hWhiteStone);

时到足以释放hWhiteStone或做我需要释放也句柄的SendMessage(返回)( - ,或者它被自动的DestroyWindow做)?

Is it enough to release hWhiteStone or do I need to release also handle returned by SendMessage() (- or is it done automatically by DestroyWindow)?

感谢您的任何信息。

克拉

推荐答案

请它主窗口的子窗口。在第四最后一个参数更改为您的主窗口的HWND做到这一点。这应该使窗户对待你的弹出窗口为同一应用程序的主窗口的一部分。

Make it a child of your main window. Do this by changing the fourth last parameter to the HWND of your main window. This SHOULD make windows treat your popup window as part of the same application as your main window.

这篇关于应用"如何从&QUOT隐藏窗口;标签在任务管理器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆