SetFocus function user32
Sets the keyboard focus to the specified window.
The window must be attached to the calling thread's message queue.
To learn more, see learn.microsoft.com/windows/win32/api/winuser/nf-winuser-setfocus.
Implementation
Win32Result<HWND> SetFocus(HWND? hWnd) {
resolveGetLastError();
final result_ = _SetFocus(hWnd ?? nullptr);
return .new(value: .new(result_), error: GetLastError());
}