vc 控制台添加托盘显示_将vc ++控制台窗口放在系统托盘中

I have small VC++ program, I want to place my output console window in the system tray not in the task bar when I have minimize the window.

I am new in vc++ please help me, how could I do this.

解决方案Basically, you need to use Shell_NotifyIcon:

http://msdn.microsoft.com/en-us/library/windows/desktop/bb762159%28v=vs.85%29.aspx[^].

This is some tutorial:

http://www.codeguru.com/cpp/controls/statusbar/systemtray/article.php/c5933/Tutorial--Write-Icon-in-the-Taskbar-Window.htm[^].

However, this is a bad place for a console application, in my opinion. The main use of this Shell feature is to provide a tiny UI, or even two views of such UI: one cold provide a visual notification in the area dedicated to "shell notify" application, and the click on it could show a bigger but still small window immediately next to the "notify icon" area, with some UI control. As you can see, this behavior is largely oriented to the windowed applications.

If you simply need the access to your or some other important applications in some convenient predictable location, perhaps you should need to make a simple system utility which behaves like a typical "notify icon" application but is used to conveniently activate other applications, some of them could be just console applications. You can devise some mechanism of registration of client applications with your utility "host" application, so your client application could be completely hidden when a user minimizes them, but represented as a clickable area in your utility screen, so the click could activate your client applications.

I would not say this would be so convenient to justify the effort. It you still think it would, you can successfully achieve it following the road map I just depicted.

Good luck,

—SA

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值