Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions sdk-api-src/content/winuser/nf-winuser-setfocus.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ Type: **HWND**

If the function succeeds, the return value is the handle to the window that previously had the keyboard focus. If the *hWnd* parameter is invalid or the window is not attached to the calling thread's message queue, the return value is NULL. To get extended error information, call [GetLastError function](../errhandlingapi/nf-errhandlingapi-getlasterror.md).

If the window that previously had the keyboard focus was destroyed after losing focus, the return value is NULL and [GetLastError function](../errhandlingapi/nf-errhandlingapi-getlasterror.md) return value is ERROR_SUCCESS (0).

Extended error ERROR_INVALID_PARAMETER (0x57) means that window is in disabled state.

## -remarks
Expand Down