user32: Cache the text buffer length to avoid excessive calls to strlenW.