CVF question: String Table caption seems to be limited at 1020 chars.
CVF question: String Table caption seems to be limited at 1020 chars.
(OP)
In using the String Table feature in Compaq Visual Fortran (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 dimensions 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? Or is the 1020-char. limit sacred and set in granite?
Also, the IDE help file seems to indicate that an expression like \r (for carriage return) in the caption text will force a new line. I have not seen this to work. Does anyone now how to force a new line in the String Table caption, or is it even really possible?
Thanks.
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? Or is the 1020-char. limit sacred and set in granite?
Also, the IDE help file seems to indicate that an expression like \r (for carriage return) in the caption text will force a new line. I have not seen this to work. Does anyone now how to force a new line in the String Table caption, or is it even really possible?
Thanks.





RE: CVF question: String Table caption seems to be limited at 1020 chars.
Anyway, if you use CRLF instead of CR, you'll get nice lines.
CODE
include 'flib.fd'
integer iret
character*1600 about
! Fill in the array
do ii = 1, 1501, 100
do jj = 0, 97
ix = ii + jj
about(ix:ix) = 'X'
end do
! Add CRLF at after 98 chars
ix = ii + 98
about(ix:ix) = char(13)
ix = ix + 1
about(ix:ix) = char(10)
end do
iret = AboutBoxQQ (about)
print *, 'Click Help/About'
stop
end
RE: CVF question: String Table caption seems to be limited at 1020 chars.
What I have in the calling program (f.WinMain) is this:
integer(4) :: MaxInput
character(1200) :: szBuffer
MaxInput = 1200
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
The string (in the Resource Editor) is filled with a lot of text, and this text is presented in an Edit Box (IDC_EditBackground) on the About Dialog with these settings: Multiline; Vertical Scroll. The amount of text is tied to the value of MaxInput & szBuffer; when these were initiated at 256, that's where the string ended. I expanded to 1000 and more text was accepted. Once I reached the "sacred" bound of 1020, that's where everything stopped.
Does this help?
RE: CVF question: String Table caption seems to be limited at 1020 chars.
The alternative is to concatenate several 256 byte strings to make up a big one.