PBT_APMBATTERYLOW event

PBT_APMBATTERYLOW is available for use in the operating systems specified in the Requirements section. Support for this event was removed in Windows Vista. Use PBT_APMPOWERSTATUSCHANGE instead.]

Notifies applications that the battery power is low.

A window receives this event through the WM_POWERBROADCAST message. The wParam and lParam parameters are set as described following.

LRESULT 
CALLBACK 
WindowProc( HWND   hwnd,    // handle to window
            UINT   uMsg,    // WM_POWERBROADCAST
            WPARAM wParam,  // PBT_APMBATTERYLOW
            LPARAM lParam); // zero

Parameters

hwnd

A handle to the window.

uMsg

Value Meaning
WM_POWERBROADCAST
536 (0x218)
Message identifier.

wParam

Value Meaning
PBT_APMBATTERYLOW
9 (0x9)
Event identifier.

lParam

Reserved: must be zero.

Return value

No return value.

Remarks

This event is broadcast when a system's APM BIOS signals an APM battery low notification. Because some APM BIOS implementations do not provide notifications when batteries are low, this event may never be broadcast on some computers.

Requirements

Requirement Value
Minimum supported client
Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
End of client support
Windows XP
End of server support
Windows Server 2003
Header
WinUser.h (include Windows.h)

See also