Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Closing all windows

Posted on 1998-11-18
3
Medium Priority
?
171 Views
Last Modified: 2013-11-20
I am wrting an app using MFC in Microsoft Visual C++
My system is connected to an UPS unit sending a command to close windows when a power failure is detected (The DestroyWindow function is automatically activated).
It is working well when my main view is active.
But if a modal dialog box is open the system crashes.
I suppose that all ressources are not closed properly.
My question is :How from the main DestroyWindow function
can i close all opened modal dialog boxes ?

Best regards !!!



0
Comment
Question by:marcelcohen
[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
3 Comments
 
LVL 3

Accepted Solution

by:
shaig earned 100 total points
ID: 1324886
Never tried it ;-)

.but call:

pMainWnd->SendMessageToDescendants( WM_DESTROY );

I hope that it will work!
0
 

Author Comment

by:marcelcohen
ID: 1324887
I try ot and it did'nt help.

0
 
LVL 3

Expert Comment

by:shaig
ID: 1324888
Do you have to close all windows or to close the entire application?
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Suggested Courses

618 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