Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

CVF question: String Table caption seems to be limited at 1020 chars.

CVF question: String Table caption seems to be limited at 1020 chars.

CVF question: String Table caption seems to be limited at 1020 chars.

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?


RE: CVF question: String Table caption seems to be limited at 1020 chars.

The 1020 limit looks like a line limit: it is not a string limit.  Basically, if a character is about 10 pixels, this would be 10200 pixels long which will easily cover more than 8 screens of 1024x768 resolution.  The Windows limit is 8 screens.

Anyway, if you use CRLF instead of CR, you'll get nice lines.


program main
   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'

RE: CVF question: String Table caption seems to be limited at 1020 chars.

Thanks XWB but I'm not sure this will help.

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.

Just been having a look at the C++ version.  The limit on strings in .rc files is 256.  I'll have to try more than 256 to see what happens.

The alternative is to concatenate several 256 byte strings to make up a big one.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


eBook - Functional Prototyping Using Metal 3D Printing
Functional prototypes are a key step in product development – they give engineers a chance to test new ideas and designs while also revealing how the product will stand up to real-world use. And when it comes to functional prototypes, 3D printing is rewriting the rules of what’s possible. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close