The WM_USERCHANGED message is sent to all windows after the user has logged on or off. When the user logs on or off, the system updates the user-specific settings. The system sends this message immediately after updating the settings.
WM_USERCHANGED
wParam = 0; // not used, must be zero
lParam = 0; // not used, must be zero
An application should return zero if it processes this message.
Windows NT: Requires version 4.0 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in winuser.h.
Windows Overview, Window Messages