Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29341 Discussions

1020-character limit on String Table caption

TommyCee
Beginner
1,231 Views
In using the String Table feature in CVF6x (linking to an About dlg. box), I seem to have noted a total character limit of 1020 (in a note I added to a caption). This is so even when the calling program dimsnsions szBuffer & MaxInput to (say) 1200 or more.

Can anyone confirm what I seem to be seeing (I saw this limit mentioned nowhere in ANY documentation), and (better) please let me know if there's a way to expand this buffer?

Thanks.
0 Kudos
7 Replies
Steven_L_Intel1
Employee
1,231 Views
I'm pretty sure this is a restriction in the resource editor - and may even be a Windows limit.
0 Kudos
TommyCee
Beginner
1,231 Views
I'm pretty sure this is a restriction in the resource editor - and may even be a Windows limit.

Thanks Steve. Don't mean to ba a pain, but is there anyway way this can be overridden? Any magic workaround?
0 Kudos
anthonyrichards
New Contributor III
1,231 Views
Quoting - tommycee

Thanks Steve. Don't mean to ba a pain, but is there anyway way this can be overridden? Any magic workaround?
Is this Microsoft technical note link of any assistance?

http://support.microsoft.com/kb/74800
0 Kudos
TommyCee
Beginner
1,231 Views
Quoting - anthonyrichards
Is this Microsoft technical note link of any assistance?

http://support.microsoft.com/kb/74800

Thanks Anthony - you may be on the right track w/ this KB article. Unfortunately, what appears to be workaround code is written in C. I'm not sure now to transpose, but the resulting rc file shown seems to have the desitred efect.

What I have in the calling program (f.WinMain) is this:

integer(4) :: MaxInput
character(1500) :: szBuffer

MaxInput = 1500
ret = LoadString(GetModuleHandle(NULL), IDS_String1, szBuffer, MaxInput)
lret = DlgInit(IDD_AboutDlg, Dlg)

...

lret = DlgSet(Dlg, IDC_EditBackground, szBuffer)
ret = DlgModal(Dlg) !Launch the About screen


If I get it, the KB article essentially suggests that I concatenate severel 255-byte strings to get a big one.
0 Kudos
TommyCee
Beginner
1,231 Views
Quoting - tommycee

Thanks Anthony - you may be on the right track w/ this KB article. Unfortunately, what appears to be workaround code is written in C. I'm not sure now to transpose, but the resulting rc file shown seems to have the desitred efect.

What I have in the calling program (f.WinMain) is this:

integer(4) :: MaxInput
character(1500) :: szBuffer

MaxInput = 1500
ret = LoadString(GetModuleHandle(NULL), IDS_String1, szBuffer, MaxInput)
lret = DlgInit(IDD_AboutDlg, Dlg)

...

lret = DlgSet(Dlg, IDC_EditBackground, szBuffer)
ret = DlgModal(Dlg) !Launch the About screen


If I get it, the KB article essentially suggests that I concatenate severel 255-byte strings to get a big one.

As with may coding conundrums, the solution often comes to me in my sleep.

The solution here actually requires NO special coding. And per SLionel's comment:
I'm pretty sure this is a restriction in the resource editor - and may even be a Windows limit.

it appears to be the former, not the latter.

The length of the string (IDS_String1) is, in fact, controlled by szBuffer & MaxInput (see my code snippet above). However, the caption screen in the IDE Resource Editor is limited to 1020 chars. Therefore, if the caption string desired >1020 chars,

Load the resource File (*.rc) from the project into a text editor and find this section:

STRINGTABLE DISCARDABLE
BEGIN
0 " "
IDS_String1 "desired text here
END


Paste in whatever text string you want (will appear as one LONG line), ensuring only one set of end quotes, w/ these caveats:
1) szBuffer & MaxInput must be sufficiently dimensioned (b/c they are controlling), and
2) what appears in the (Resource Editor) caption window, while all of the text string, will NOT be editable (b/c its >1020 chars). Additional editing must be done outside the IDE (as described above).

It would be nice is this were addressed in xVF documentation.
0 Kudos
Steven_L_Intel1
Employee
1,231 Views

The resource editor is part of Visual Studio - and in the case of Intel Visual Fortran, we don't ship it.
0 Kudos
TommyCee
Beginner
1,231 Views

The resource editor is part of Visual Studio - and in the case of Intel Visual Fortran, we don't ship it.

Duly noted, Steve (re: Resource Editor & Visual Studio).

While I'm at it, I revise (clarify) my 2nd caveat (above):
2) what appears in the (Resource Editor) caption window, while all of the text string, cannot be expanded - only characters deleted (b/c the string presented exceeds 020 chars). Any expansions must be done outside the IDE (as described above).
0 Kudos
Reply