This function sets the keyboard input focus to the object. If the object cannot accept keyboard messages focus will not be changed. This function resets FOCUSED state for the object was in focus previously, set FOCUSED state for the required object and marks the objects to be redrawn.