WM_POWERBROADCAST Messages

BlitzMax Forums/BlitzMax Programming/WM_POWERBROADCAST Messages

Mirko(Posted 2005) [#1]
Hi,
my application needs to know if the computer is going into hibernate, standby or power off mode and when the computer is returning from one of this modes.

I guess the WM_POWERBROADCAST would be the right thing, but how would i get this message within bmx, without using c++ ?

Does anyone have an example how to peek and work with window messages within bmx?


Mirko(Posted 2005) [#2]
Ok, i found out that PeekMessageA, TranslateMessage and DispatchMessageA are defined in bm
But if i peek messages i only receive one single message (512) shortly after i start the program and then no other.

What am i doing wrong? I should at least receive messages for mousemove or things like that all the time.