6
votes

We are using MFC static control in a dialog box to display some content to user. Both static control and dialog box are defined in a resource file (.rc) as LTEXT and DIALOG. Problem is if content is more than 256 character, it gets truncated. Does anyone know how can this limit be increased. The control and dialog box are old style.

3

3 Answers

9
votes

enter image description here

You can vote for this problem here. Don't expect miracles, the resource compiler is neolithic. You'll have to work around it by using more than one static control or setting the text at runtime in the WM_INITDIALOG message handler. Don't overestimate the user's patience.

0
votes

Static controls display text but have no user interaction; They don't have scroll bars, and truncate text to fit the control's bounds. If your problem is that the text fills the control and is truncated, consider switching to a read-only edit control.

If however the control is only accepting 256 characters even though there is room for more, I'm not sure why that would be. MSDN doesn't mention a limit to the size of the control's text.

0
votes

In my understanding the compiler seems to have limitation with the in-lined strings in the compilable modules. Why don't you mind creating a string table if you're using such large text for a caption? For static controls there are no such limitations with 256K characters.