I had this same issue only with a RichEdit control.

You could try making a control variable to the edit box and use ::ReplaceSel with the second parameter as 0.

m_EditControl.ReplaceSel(sThisError,0);
UpdateWindow();

This worked for me in the RichEdit control.