Skip to content

Latest commit

 

History

History
88 lines (54 loc) · 1.7 KB

wm-setfocus.md

File metadata and controls

88 lines (54 loc) · 1.7 KB
title description ms.assetid keywords topic_type api_name api_location api_type ms.topic ms.date
WM_SETFOCUS message (Winuser.h)
Sent to a window after it has gained the keyboard focus.
77180e4c-95a6-41a4-93d9-033381ae7543
WM_SETFOCUS message Keyboard and Mouse Input
apiref
WM_SETFOCUS
Winuser.h
HeaderDef
reference
05/31/2018

WM_SETFOCUS message

Sent to a window after it has gained the keyboard focus.

#define WM_SETFOCUS                     0x0007

Parameters

wParam

A handle to the window that has lost 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

To display a caret, an application should call the appropriate caret functions when it receives the WM_SETFOCUS message.

Requirements

Requirement Value
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_KILLFOCUS

Conceptual

Keyboard Input