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

unable to set windowconfig structure properties

AlbertMoxey
Beginner
465 Views
Hi,
I'm trying to change the title ofa QuickWin child window (already opened), by using getwindowconfig, changing the title property, and then setwindowconfig. This happens OK in IVF v10 and earlier, but it doesn't want to work in v11.1. It appears that some properties (title, mode, etc.) ofa variable of type windowconfig cannot be changed if there exists a call to getwindowconfig. Even a windowconfig type that is not used, I cannot change. As soon as I comment out the call to getwindowconfig, all works fine (except that I can't get the window properites, which defeats the point!). Any ideas?

Thanks.

Sample code:
use ifqwin

implicit none

type (windowconfig) wc
type (windowconfig) unrelated_wc
logical lret

open(unit=25, file='USER', title='open title')

! the following two lines do nothing, even before the call to getwindowconfig
wc%title = "changed title"C
wc%mode = QWIN$SCROLLDOWN

lret = getwindowconfig(wc) ! if I comment this line out, all works

wc%title = "changed title again"C ! this won't work
wc%mode = QWIN$SCROLLDOWN ! this won't work
wc%numxpixels = -1 ! this gets set!

!
! even if I try with this (unaffected by the call to getwindowconfig), these won't get set
unrelated_wc%mode = QWIN$SCROLLDOWN
unrelated_wc%title = "unrelated_wc"C
!
lret = setwindowconfig(wc)
0 Kudos
1 Reply
anthonyrichards
New Contributor III
465 Views
Quoting - AlbertMoxey
Hi,
I'm trying to change the title ofa QuickWin child window (already opened), by using getwindowconfig, changing the title property, and then setwindowconfig. This happens OK in IVF v10 and earlier, but it doesn't want to work in v11.1. It appears that some properties (title, mode, etc.) ofa variable of type windowconfig cannot be changed if there exists a call to getwindowconfig. Even a windowconfig type that is not used, I cannot change. As soon as I comment out the call to getwindowconfig, all works fine (except that I can't get the window properites, which defeats the point!). Any ideas?

Thanks.

Sample code:
use ifqwin

implicit none

type (windowconfig) wc
type (windowconfig) unrelated_wc
logical lret

open(unit=25, file='USER', title='open title')

! the following two lines do nothing, even before the call to getwindowconfig
wc%title = "changed title"C
wc%mode = QWIN$SCROLLDOWN

lret = getwindowconfig(wc) ! if I comment this line out, all works

wc%title = "changed title again"C ! this won't work
wc%mode = QWIN$SCROLLDOWN ! this won't work
wc%numxpixels = -1 ! this gets set!

!
! even if I try with this (unaffected by the call to getwindowconfig), these won't get set
unrelated_wc%mode = QWIN$SCROLLDOWN
unrelated_wc%title = "unrelated_wc"C
!
lret = setwindowconfig(wc)
After your OPEN statement, precede your firstcall to getwindowconfig with a call
to Setwindowconfig. e.g. add

Logical status
! Set the x & y pixels to 800X600 and font size to 8x12.
wc%numxpixels = 800 ! pixels on x-axis, window width
wc%numypixels = 600 ! pixels on y-axis, window height
wc%numtextcols = -1 ! -1 requests system default/calculation
wc%numtextrows = -1
wc%numcolors = -1
wc%title = " "C
wc%fontsize = #0008000C ! Request 8x12 pixel fonts
status = SETWINDOWCONFIG(wc)
IF(.NOT.status) status = SETWINDOWCONFIG(wc)


Then use Getwindowconfig and setwindowconfig.
0 Kudos
Reply