PBT_APMPOWERSTATUSCHANGE
The
PBT_APMPOWERSTATUSCHANGE message is sent when a change in the power status of
the computer is detected, such as a switch from battery power to A/C or a drop
in remaining battery power below a threshold. A window receives this message
through the WM_POWERBROADCAST
dwData = (DWORD) lParam;
Parameters
dwData
Reserved;
must be 0.
Return Values
No return
value.
Remarks
An application
should process this message by calling the GetSystemPowerStatus function
to retrieve the current power status of the computer. In particular, the
application should check the ACLineStatus, BatteryFlag, BatteryLifeTime,
and BatteryLifePercent members of the SYSTEM_POWER_STATUS
structure for any changes. This message can occur when the battery life time
drops to less than 5 minutes, or when the percentage of battery life drops
below 10 percent.
See Also