This method sets or removes the keyboard focus to or from the control. For a windowed control, the Windows API function SetFocus is called. For a windowless control, IOleInPlaceSiteWindowless::SetFocus is called. Through this call, a windowless control obtains the keyboard focus and can respond to window messages.
BOOL SetControlFocus( BOOL bGrab );
Header file: | Atlctl.h |
Platforms: | |
Versions: | 2.0 and later |
Complete documentation: | Visual C++ documentation |
CComControl Overview, CComControl Methods