CWindow::SetFocus

This method sets the input focus to the window.

Syntax

HWND SetFocus( );

At a Glance

Header file: Atlwin.h
Platforms:
Versions: Version 2.0 and later
Complete documentation: Visual C++ documentation

Remarks

In Windows CE, you can't set the keyboard focus to a window associated with another thread's message queue. There is one exception. If a window on one thread is the child of the window on the other thread, or if the windows are siblings of the same parent, the thread associated with one window can set the focus to the other window even though it belongs to a different thread.

See Also

CWindow Overview, CWindow Methods