This message is sent when the power is turned off or on.
Power notification type |
Value |
APC_PWRNOTIFYTYPE_USER | 1 |
APC_PWRNOTIFYTYPE_ELECTRICAL | 2 |
APC_PWRNOTIFYTYPE_BACKUPBATTERY_LOW | 3 |
For BATTERY_LOW, HIWORD(lParam) is FALSE if the battery is low, or TRUE if the battery is not low. LOWORD(lParam) gives the zero-based index of the battery.
An APC_PWRNOTIFYTYPE_ELECTRICAL notification is not sent when the electrical power is removed, only when it is restored.