We have an application that is supposed to run as a service. When someone shuts down the computer, the app is supposed to save the contents of the screen into a file so it can be loaded back up when the computer comes back on.
So my question is, does shuting down the computer send a WM_DESTROY message to the program if it is being run as a service? If not, why not?
Thanks!
5 1863 RedSon 5,000
Recognized Expert Expert
We have an application that is supposed to run as a service. When someone shuts down the computer, the app is supposed to save the contents of the screen into a file so it can be loaded back up when the computer comes back on.
So my question is, does shuting down the computer send a WM_DESTROY message to the program if it is being run as a service? If not, why not?
Thanks!
I think all applications are asked by the OS to close when the computer is shutting down. So that means that the application would get the same messages as if a user had clicked on the little X button.
Well, we've tested it, and if we close the app via the X, then the message gets sent as it should. But if we shut the computer down while the service is still running, then it doesn't get sent.
Any thoughts?
RedSon 5,000
Recognized Expert Expert
Well, we've tested it, and if we close the app via the X, then the message gets sent as it should. But if we shut the computer down while the service is still running, then it doesn't get sent.
Any thoughts?
Subscribe to power management events?
Well, that's part of my question. What messages get sent to the app if the power button is hit? Does WM_POWERBROADCA ST get sent?
RedSon 5,000
Recognized Expert Expert
Well, that's part of my question. What messages get sent to the app if the power button is hit? Does WM_POWERBROADCA ST get sent?
On mobile devices it does. I would think that the XP powermanager would be more advanced the mobile devices, so you probably want to read up on MSDN for that message.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Tim Marshall |
last post by:
I'm having a vexing problem with using filecopy and compactdatabase on a
Jet back end I'm sure I did not have with A97. It seems to me that
A2003 is much slower in shutting down the back end ldb than A97 and the
code below (for compactdatabase) gets caught and throws an error related
to the BE still being open.
I would really appreciate...
|
by: Rajko |
last post by:
How come I don't get WM_DESTROY message when I call CDialog::OnOK()?
CDialog::OnOK() calls EndModalLoop() and EndDialog();
But there is no WM_DESTROY, which I need to end thread.
BTW I dont want to post quit message at two places when I could post it on
one place.
Thx, Rajko.
|
by: Frank |
last post by:
My program gets a WM_QUERYENDSESSION message and asks the user if it is OK
to shutdown.
While he's thinking about it, Windows displays a box saying the program is
not responding, and if not answered shuts down my program.
I need to delay that while until the user answers my program's dialog box.
How does Windows check to see if an app...
|
by: Sebouh |
last post by:
Hi guys.
I''m curious about what happens when windows shuts down. I have a program running that saves data into a file when the form's closing method is invoked. So when Windows shuts down, does it call this method?
Plus, i need to implement the method in a way that, when the user clicks the X button on the form, the program minimizes and a...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| | |