BOOL SetControlFocus( BOOL bGrab );
Return Value
Returns TRUE if the control successfully receives focus; otherwise, FALSE.
Parameters
bGrab
[in] If TRUE, sets the keyboard focus to the calling control. If FALSE, removes the keyboard focus from the calling control, provided it has the focus.
Remarks
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.