PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

How to detect when the user press the power buton?

I need to close my app when the user powers down the pda. But i don't know how to capture the event. It works with any other button using :

HRESULT SecondEventHandler::onKeyDown(DWORD dwKey, KeyList& keylist)
{
return -1;
}

but it doesn't capture the power button.

any advice?