Dmitry Timoshkov : user32: WM_GETTEXT message converters have to 0-terminate output buffer if there is enough space even if there is no text to convert .