first of all, it is BAD IDEA to alter U++ sources...
Anyway, in this case, the trouble is that LostFocus is overriden in EditString.
You might do it the right way, inheriting EditString class to some "EditStringWithGotFocusCallback" and overriding LostFocus again. Just do not forget to call inherited version (it does something important).