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

Quickwin application - limit for numTextRows ?

schuerg
Beginner
504 Views
We are using Microsoft Visual Studio 2008 with Intel Visual Fortran compiler 11.1.65. We are running a Quickwin application. If the value for numTextRows is set to a high number, i.e. 20000, this results in Out of Memory error.

- Is there a way to increase the limit?
- If the display needs a larger amount of lines than declared, the display becomes very slow. Is there a way to avoid that?
- Is there generally a way to speed up the display?

Thanks
Marco
0 Kudos
3 Replies
Jugoslav_Dujic
Valued Contributor II
504 Views
QuickWin sucks has serious limitations when it comes to drawing efficiency, and handling of text output. You get an out-of-memory, because QuickWin wants to allocate a huge memory bitmap, which could take all 20,000 rows at a time.

Unfortunately, QuickWin is (as much as I see it, haven't really followed it lately) not being improved by Intel -- basically, it offers the same functionality and performance as it used to back in Microsoft PowerStation days, in mid-1990s. One reason why the display is so slow is because the contents of the said memory are "flushed" to the screen after every graphical operation (TEXTOUT, RECTANGLE etc).

For the case of text output, I would recommend using a [modeless] dialog with a multi-line edit box. The edit box could be appended through DlgSendDlgItemMessage(EM_SETSEL/EM_REPLACESEL). (There are old posts in this forum for the technique, please search it).

You might want to investigate my xeffort library (see my signature), which is, however, not compatible with QuickWin. However, it hasn't been upgraded lately due to my lack of time, but hey, it is open source...



0 Kudos
schuerg
Beginner
504 Views
Thanks for the reply. We are using an old software, that is running as a quickwin application. Changing this would be a lot of work. Before we decide to do something like that we want to make sure that there is not an easier way. That is why I have attached an example code to show the problem more specifically. Here, numTextRows is set to 1000. If we run the code and set the number of lines in the Window that pops up to more than 1000, the output becomes very slow after 1000 is reached. Is there any way to avoid this? Is it possible to keep, for example, the last 1000 lines in the window, without the speed of the output being affected?

Thanks
Marco

[fortran]      integer (2) nCols, nLines, nRows
      nLines = 1000
call Zgetwindowconfig (nCols, nRows, 0) call Zsetwsizeqq (-1, "", "", 0, 0, 0, 0, 0) call Zsetwsizeqq ( 0, "", "", 0, 0, nRows-10, nCols/2, -1) call Zsetwindowconfig (-1, -1, nCols, nLines, "Dialog"C, -1) j = 0 20 write (*, '(/,A)') ' Enter the number of lines: ' read (*,*) k if (k .eq. 0) goto 60 do 40 i = j+1, j+k write (*,*) i, i, i 40 continue j = j + k goto 20 60 end subroutine Zsetwsizeqq (iunit, cfile, ctitle, ix, iy, ih, iw, 1 icolor) use IFQWIN character *(*) cfile, ctitle integer (2) ix, iy, ih, iw integer iunit, icolor, result type (qwinfo) winfo if (iunit) 20, 60, 40 20 winfo.type = QWIN$MAX result = SETWSIZEQQ (QWIN$FRAMEWINDOW, winfo) goto 80 40 open (unit = iunit, file = cfile, title = ctitle) 60 winfo.type = QWIN$SET winfo.x = ix winfo.y = iy winfo.h = ih winfo.w = iw result = SETWSIZEQQ (iunit, winfo) 80 return end subroutine windowconfig use IFQWIN character *(*) title integer ( 2) iCursor, nCols, nRows integer ( 4) fsize logical status /.false./ type (windowconfig) wc entry Zgetwindowconfig (nCols, nRows, iCheck) status = GETWINDOWCONFIG (wc) if (.not. status) goto 20 nCols = wc.numTextCols nRows = wc.numTextRows goto 40 entry Zsetwindowconfig (nXpixels, nYpixels, nCols, nRows, 1 title , fsize) wc.numXpixels = nXpixels wc.numYpixels = nYpixels wc.numTextCols = nCols wc.numTextRows = nRows wc.title = title wc.fontSize = fsize wc.mode = QWIN$SCROLLDOWN status = SETWINDOWCONFIG (wc) iCursor = DISPLAYCURSOR ($GCURSORON) if (status) goto 40 20 write (*,*) 'Error: subroutine windowconfig' 40 return end [/fortran]
0 Kudos
anthonyrichards
New Contributor III
504 Views
It is not a great deal of work to do what Jugoslav suggests, to create a list-box and populate it as described by just entering the next line of text as an item into it. I believe a list-box can have as many as 32,767 items. Although the number of items is restricted, the total size in bytes of the items in a list box is limited only by available memory.
0 Kudos
Reply