Please, ignore this patch. It's overkill to check the bounding box during every caret timer callback. I have found a better approach to this by checking inside SetCaretPos/ShowCaret. That's because the caret doesn't move by itself so it's useless to check everytime.
Thanks, Bruno