05-04-2009, 04:40 PM
It also somehow works, and is easier. But you need to update text in control2 when text (number of lines) in control1 changes. And remove WS_VSCROLL style from control1. And optionally add ES_AUTOHSCROLL style to both controls to prevent word wrapping. And change Edit to RichEdit20A.
To receive EN_CHANGE message from a rich edit control, under case WM_INITDIALOG use
, and insert this under sel wParam
To receive EN_CHANGE message from a rich edit control, under case WM_INITDIALOG use
, and insert this under sel wParam