Jump to content
Sign in to follow this  

Treo 700w Keyguard detection in c/c++

Recommended Posts

My app is a full screen game. When the Treo enters suspend mode,

and the screen goes black it appears to suspend my app. When

the red power key is tapped it rsumes the app. Unfortunately, the

Keyguard window is sitting on top of my app. My app gets no WM_ACTIVATE

message so I've no chance to suspend my app and pull it out of full

screen mode so that the user can see the message (right now the message just

flashes very quickly and is basically unreadable. The same thing would happen if

I did not suspend the app when it loses focus to another window).

I've taken a look at the power notification architecture APIs like CeSetUserNotificationEx,

but they don't seem to serve my needs. Notification is through event triggering,

(which would mean I'd have to have a thread dedicated to just that trigger), or

it will run an app (not what I want either). I want a callback function or WM_ message

so I don't have to dedicate system resources to monitoring an uncommon event.

Isn't there a WM_ message or other way to get notification that the app is supending/resuming?

WM_HIBERNATE doesn't seem right from the description.

thanks for help...

Edited by zorba990

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this