Wouldn’t it be easier to handle WM_SETTEXT in that edit control and “massage” the text there?