#CEdit and Margins
3 messages in this thread
<< Hi! I have a Multi-line CEdit control that I am trying to make perform like
a poor man's editor. Is there a technique by which I can set margins within
the edit control so that the text auto-wraps at the margin? At the margin I
would also like to insert a CR/LF combination when wrapping. Any help would be
greatly appreciated!>>
MLEs automatically do word-wrap. But you don't want to insert a CR/LF at a
break, because the wrap point will change if the window size changes. You only
want to insert line breaks when you read the wrapped text out of the MLE to
store it somewhere, like in a file.
Steve:
That's exactly my point. I want to set a hard margin within the window
regardless of how the window sizes. The fact that the MLE wraps at the window
boundary is my problem.
Thanks,
Kev.
<< That's exactly my point. I want to set a hard margin within the window
regardless of how the window sizes. The fact that the MLE wraps at the window
boundary is my problem.>>
If you want the text-display area of the MLE to be a controlled size
independent of the size of the MLE, use CEdit::SetRect() to change the
formatting rectangle of the MLE.