The problem is your use of the WS_OVERLAPPEDWINDOW
style. Rich edit controls are designed to be used as child windows and do not support WS_OVERLAPPEDWINDOW.
WS_OVERLAPPEDWINDOW compiles as 0x00CF0000. This overlaps several rich edit styles, namely:
ES_VERTICAL 0x00400000
ES_NOIME 0x00080000
ES_SELFIME 0x00040000
So applying the WS_OVERLAPPEDWINDOW macro to your control is the same as applying those styles.