PBT_APMRESUMEAUTOMATIC event

Notifies applications that the system is resuming from sleep or hibernation. This event is delivered every time the system resumes and does not indicate whether a user is present.

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

Note

In Windows 10, version 1507 systems and later, if the system is resuming from sleep only to immediately enter hibernation, then this event isn't delivered. A WM_POWERBROADCAST message is not sent in this case.

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

Parameters

hwnd

A handle to window.

uMsg

Value Meaning
WM_POWERBROADCAST
536 (0x218)
Message identifier.

wParam

Value Meaning
PBT_APMRESUMEAUTOMATIC
18 (0x12)
Event identifier.

lParam

Reserved: must be zero.

Return value

No return value.

Remarks

If the system detects any user activity after broadcasting PBT_APMRESUMEAUTOMATIC, it will broadcast a PBT_APMRESUMESUSPEND event to let applications know they can resume full interaction with the user.

Requirements

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

See also