CWindow::SetFocus

This method sets the input focus to the window.

At a Glance

Header file: Atlwin.h
Windows CE versions: 2.0 and later
Complete documentation: Visual C++ documentation

Syntax

HWND SetFocus( );

Remarks

In Windows CE, you cannot 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.