PocketMatrix forums

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

Low power popup

This might be a dumb question, but the low battery
popup window is killing me. 8O How can I disable it from
appearing ?
Or make it unvisible ?
I just don't want it to be activated.

Thanks,
Jaco
nicholsr · 23 Oct 2003, 13:54 UTC — Low power popup
jcronje wrote:
This might be a dumb question, but the low battery
popup window is killing me. 8O How can I disable it from
appearing ?
Or make it unvisible ?
I just don't want it to be activated.

Thanks,
Jaco


Hi Jaco;

:? Doesn't turning of the notification for low battery warning do it?

I have mine set for no sounds no message and no flash and I never get the popup.

Richard 8O
Yes, but I would like to do it in a code..
Not manually.

A piece of code that switches notifications off
will help.
from what I remember when I had this problem in the past was that you couldn't actually grab the handle to the popup, so would have to pause you game when it loses focus, let the user get rid of pop up then refocus you game, think we discussed this in here somewhere before.

Jim.
jcronje wrote:
Yes, but I would like to do it in a code..
Not manually.

A piece of code that switches notifications off
will help.


No code but...

The registry key:
HKEY_CURRENT_USER\ControlPanel\Notifications\{A877D663-239C-47a7-9304-0D347F580408}
Has the following values.

@="Low Battery Warning"
"Wave"="Lowbatt"
"Duration"=dword:00000000
"Options"=dword:00000001


For Options I found
Play Sound CheckBox ON
"Options"=dword:00000001

Flash Light CheckBox ON
"Options"=dword:00000004

Display Message CheckBox ON
"Options"=dword:00000008

So, you can use a combination of AND and OR to set and clear each bit.

Note, there was nothing on any of my 4 PPC's that had the dword:00000002 value.

It appears that if the key and/or options are missing you get the normal popup at 40%.

Hope this helps..

:wink: Richard
Thanks, it seems to work :-)

Code:

HKEY myKey;
unsigned char myDt[4];
if (RegOpenKeyEx(HKEY_CURRENT_USER,_T("ControlPanel\\Notifications\\{A877D663-239C-47a7-9304-0D347F580408}"),
0,0,&myKey;)==0)
{
memset(myDt,0,sizeof(myDt));
RegSetValueEx( myKey,_T("Options"),0,REG_DWORD,&myDt;[0],4);
}
Also, don't forget to test that piece of code to a PPC, PPC2002 and WM2003 OS device so your game will work on all platforms. :)
Maybe better to use RegEnumKeyEx then, and try
and locate the correct final key to modify.
I only have a PPC converted to a PPC2002 device.

Any one want to check their registries to see if microsoft kept things the same ?
jcronje wrote:
Maybe better to use RegEnumKeyEx then, and try
and locate the correct final key to modify.
I only have a PPC converted to a PPC2002 device.

Any one want to check their registries to see if microsoft kept things the same ?


By it's name and location in the registry it appears to be a Microsoft reference so it should be there for all Pocket PC or it would break existing software.

I removed the entire low battery node on my AudioVox and lost the setup option. And when I put it back it worked like before!

I checked all 4 of mine when I made the reference. And it seemed to be the same name and location on each.

iPaq 3850 with Mobile 2003 upgrade
HP h3910
Toshiba e740
AudioVox Maestro (PDA-1032)

:wink: Richard
Why would you want to disable the low batt popup? It's there for a reason.
Jim wrote:
so would have to pause you game when it loses focus, let the user get rid of pop up then refocus you game, think we discussed this in here somewhere before.

Jim.