How to increase character limit in MFC static control

We use the static MFC control in the dialog box to display some content for the user. Both the static control and the dialog box are defined in the resource file (.rc) as LTEXT and DIALOG. The problem is that if the content is more than 256 characters, it is truncated. Does anyone know how this limit can be increased. The control and dialog box is an old style.

+4
source share
3 answers

enter image description here

You can vote for this issue here . Do not expect miracles, the resource compiler is non-personal. You will have to work around this by using more than one static control or setting the text at run time in the WM_INITDIALOG message handler. Do not overestimate user patience.

+5
source

Static controls display text but have no user interaction; They do not have scroll bars and crop text to fit control boundaries. If your problem is that the text fills the control and is truncated, consider switching to a read-only control.

If, however, the control accepts only 256 characters, although there is room for more, I'm not sure why that would be. MSDN does not mention control text size limits.

0
source

In my understanding, the compiler seems to have limitations with inline strings in compiled modules. Why don't you create a row table if you use such large text for the heading? For static controls, such restrictions do not have 256K characters.

0
source

All Articles