PBT_APMRESUMESUSPEND event

Notifies applications that the system has resumed operation after being suspended.

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_APMRESUMESUSPEND
            LPARAM lParam); // zero

Parameters

hwnd

A handle to window.

uMsg

Value Meaning
WM_POWERBROADCAST
536 (0x218)
Message identifier.

wParam

Value Meaning
PBT_APMRESUMESUSPEND
7 (0x7)
Event identifier.

lParam

Reserved; must be zero.

Return value

No return value.

Remarks

An application can receive this event only if it received the PBT_APMSUSPEND event before the computer was suspended. Otherwise, the application will receive a PBT_APMRESUMECRITICAL event.

If the system wakes due to user activity (such as pressing the power button) or if the system detects user interaction at the physical console (such as mouse or keyboard input) after waking unattended, the system first broadcasts the PBT_APMRESUMEAUTOMATIC event, then it broadcasts the PBT_APMRESUMESUSPEND event. In addition, the system turns on the display. Your application should reopen files that it closed when the system entered sleep and prepare for user input.

If the system wakes due to an external wake signal (remote wake), the system broadcasts only the PBT_APMRESUMEAUTOMATIC event. The PBT_APMRESUMESUSPEND event is not sent.

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