1

I'm working on a small chat application written in C++/Qt. My users are complaining that the connection is not shut down gracefully when they are closing the laptop lid and the computer enters standby.

Is there a Win32 hook available that is called when Windows is about to enter standby?

danbtl
  • 84
  • 1
  • 10

2 Answers2

2

WM_POWERBROADCAST

Luke
  • 11,211
  • 2
  • 27
  • 38
1

Reimplement QCoreApplication::winEventFilter in your application to handle Windows standby events.

Symbiosoft
  • 4,681
  • 6
  • 32
  • 46