Solved

Closing Popup windows on taskbar

Posted on 1998-12-27
2
192 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 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Title # Comments Views Activity
sumDigits challenge 9 178
maxBlock challenge 30 150
Capture logon name 13 119
Problem to App source 6 119
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

739 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