470,831 Members | 1,412 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,831 developers. It's quick & easy.

Detect and close all running applications

Hi. I tried to detect all running user applications (no all processes) and
close them all. Obviously this is a usual function that has been existing in
many programs.

I used the ::EnumWindows API to enumerate all the windows. There are a lot
of irrelevant result so I have to use some filters. One of them is to filter
out the invisible windows.

But unfortunately this filter also filters out the applications that was
minimized in to a tray icon. But if I turn off this filter, a lot of
irrelevant system processes and other hidden windows will get through as
well. I have no way to tell which one among them is user application, which
one is not.

I noticed that the taskmgr program in windows has the same problem. It
doesn't display the tray icon programs. Instead, it only displays their
processes in the processes list.

I have imagined that if there is API to enumerate the applications that has
a tray icon, it would solve my problem. Or maybe there is a better way to get
the list of user applications rather than using ::EnumWindows, but I have no
clue about it.

So anyone of you has a thought?

Thanks very much!

Jul 11 '06 #1
0 995

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by JuanR | last post: by
2 posts views Thread by Mike Stephens | last post: by
2 posts views Thread by Steven | last post: by
6 posts views Thread by Frank L | last post: by
9 posts views Thread by SeC | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.