How to increase character limit in MFC static control
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开发者_C百科 control and dialog box are old style.
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.
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.
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.
精彩评论