Currently, the DT_MOFIYSTRING parameter is not working in TEXTOUT( rect, flags, text).
I assume that the reason is the declaration of the text parameter as CONST. To get the DT_MODIFYSTRING option to work it needs to be changed to VAR, which might have a lot of side-effects.