?
Solved

Closing Popup windows on taskbar

Posted on 1998-12-27
2
Medium Priority
?
194 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 80 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses
Course of the Month14 days, 18 hours left to enroll

771 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