How do wx classes respond to PBT_APMSUSPEND on windows?

13 views
Skip to first unread message

Ken Vives

unread,
Apr 18, 2015, 4:27:33 PM4/18/15
to wxpytho...@googlegroups.com
Hello,

I have written a windows application that uses adv.TaskBarIcon to run code on power events. I register the TaskBar 'window' to receive WM_POWERBROADCAST events and am using a wndproc hook to catch the messages and run code via a message handler.
This seems to work fine for monitor power events, but with system suspend events, the power off messages never reach my message handler. If I manually create a hidden window and hook it's messages, it catches the messages without a problem.

So this led me to wonder if wx is catching these messages and suspending code and not passing the message to my handler? And if so, is there any way to change that behavior so that the messages are passed along to my code?

Thanks.

Ken Vives

unread,
Apr 18, 2015, 4:29:21 PM4/18/15
to wxpytho...@googlegroups.com
Sorry, I forgot to mention that I am using Python 2.7 32bit on Windows 7 and wxPython Phoenix, latest snapshot.
Reply all
Reply to author
Forward
0 new messages