Solved

Closing Popup windows on taskbar

Posted on 1998-12-27
2
191 Views
Last Modified: 2013-11-20
There is a hurdle i have encountered in closing all the programs. I would like to close only pop-up windows i.e. those programs which appear on the TaskBar. Also,
if any program asks for the Save dialog before quitting, then the default selection or 'Yes' should be automatically selected before closing the program without user's intervention. Please help me complete this program.

0
Comment
Question by:lordbeachboy
2 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 1326768
Quote from 'http://www.experts-exchange.com/topics/comp/os-ms-windows/programming/mfc/Q.10111542' aka 'EnumWindows' in the MFC Programming Area (obviously by you using a differnt login!)
Q:
I would like to thank the experts jkr and zyqwert for helping me
solve the Enumwindows problem.
Now, there is another hurdle i have encountered in closing all the programs. I would like to close only pop-up windows i.e. those programs which appear on the TaskBar. Also,
if any program asks for the Save dialog before quitting, then the default selection or 'Yes' should be automatically selected before closing the program without user's intervention. Please help me complete this program.
C:
NatasBoy - this is a completely different task ;-)
But anyway, responding to 'Save' dialogs is difficult to accomplish automatically - just consider that the 'OK' or 'Save' button (you already see it) may be named arbitrarily, it is also hard to find out what dialog control code it uses (well, this can be done easily for MFC applications, as the use the same conventions, but is almost impossible for 'unknown' apps)

Don't try to cheat here at  EE using multiple accounts - and, please, don't do that so obvious ;-)
0
 

Accepted Solution

by:
dagangwang earned 40 total points
ID: 1326769
1. Use "EnumWindows" function to enum all windows;
2. In enum callback function, you handle all windows that   have "WS_EX_TOOLWINDOW"
    style,  post "WM_CLOSE" message to these windows ;
3. Automatically selection is not a possibility;
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question