WM_KILLFOCUS message

Sent to a window immediately before it loses the keyboard focus.

#define WM_KILLFOCUS                    0x0008

Parameters

wParam

A handle to the window that receives the keyboard focus. This parameter can be NULL.

lParam

This parameter is not used.

Return value

An application should return zero if it processes this message.

Remarks

If an application is displaying a caret, the caret should be destroyed at this point.

While processing this message, do not make any function calls that display or activate a window. This causes the thread to yield control and can cause the application to stop responding to messages. For more information, see Message Deadlocks.

Requirements

Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Header
Winuser.h (include Windows.h)

See also

Reference

SetFocus

WM_SETFOCUS

Conceptual

Keyboard Input