I've been having quite a few problems moving over to FTN8.1 from 7.1. In this example I'm calling CLEARWIN_STRING@('CALLBACK_REASON') within a %gr callback and it is returning frequent '?' strings when clicking around within the area, particularly click and drag. It's not really a problem but the help states '?' means 'not in callback', and this behaviour doesn't occur in 7.1.
Here's a cut-down example:
! Demonstrates occasional return of '?' from CLEARWIN_STRING@('CALLBACK_REASON') when
! within%gr callback. Typically on click and drag within the gr
winapp
use mswin
integer:: gr_dx = 600;
integer:: gr_dy = 300;
external grCallback
i = winio@('%ww[no_border,independent,not_fixed_size]&')
i = winio@('%ca[FTN Test]%nd&')
i = winio@('%pv%`^gr[white,user_resize,full_mouse_input,rgb_colours]%nl', &
gr_dx, gr_dy, 1, grCallback)
end
integer function grCallback()
use mswin
character*32 rstr
rstr = CLEARWIN_STRING@('CALLBACK_REASON')
if (rstr /= 'MOUSE_MOVE' .and. rstr /= 'RESIZE') print *, rstr(1:LEN_TRIM(rstr)) ! sometimes '?' which means 'not in callback'
grCallback = 1
end function grCallback
This is compiling as x86 under Windows 10 so may well be a Win 10 issue, although it doesn't happen in Win 10 when compiled with FTN 7.1.
Alan