Здравствуйте, Аноним, Вы писали:
А>Привет!
А>Столкнулся с такой проблемой:
А>1) Создаю CRichEditCtrl с параметрами -> WS_HSCROLL | WS_VSCROLL | WS_BORDER | WS_TABSTOP | WS_CHILD | ES_MULTILINE | ES_READONLY А>2) делаю SetWindowText со длинной строкой, от 4000 чаров. А>3) CRichEditCtrl разбивает эту строку непонятным образом, делает переносы (где ему вздумается) и вместо одной строки рисует 2 и более.
А>Нужно: А>1) писать длинные строки в CRichEditCtrl полностью; А>или в крайнем случае: А>2) конролируемый перенос, скажем максимальная длина строки — 2000 и всё, что за ней переносится на следующие строки автоматом (без писанины кода).
А>Подскажите, пожалуйста, как это сделать быстро и просто?
Changing the Formatting Rectangle
The visibility of an edit control's text is governed by the dimensions of its window rectangle and its formatting rectangle. The window rectangle is the client area of the window containing the edit control. The formatting rectangle is a construct maintained by the system for formatting the text displayed in the window rectangle. When an edit control is first displayed, the two rectangles are identical on the screen. An application can make the formatting rectangle larger than the window rectangle (thereby limiting the visibility of the edit control's text) or smaller than the window rectangle (thereby creating extra white space around the text).
An application can set the coordinates of an edit control's formatting rectangle by sending it an EM_SETRECT message.