Who can help me. When the cursor is located in the area of the edit box, the ampersand (&) marked accelerator keys “c” ”d” and “e” don’t work. Is it possible to call the call-back function “change_line()” from the function “keyboard_monitor()” or before the stop command? Or exist another solution for this problem? This is only a small example, the original edit box have hundreds of lines.
module edit_modul
character buffer*100
integer*4 e(24),n,i,aus_ein,izeile_anf
common /e_info/e,n,i,aus_ein,buffer,izeile_anf
end module edit_modul
WINAPP
program editor
use edit_modul
include<windows.ins>
external change_line,delete_line,end_line,keyboard_monitor
call add_keyboard_monitor@(keyboard_monitor)
buffer = '1234567890'
buffer(10:10) = char(0)
i=winio@('%2nl%12.10`eb[vscrollbar,no_hscroll,alt_edit,read_only,no_cursor_snap]&',buffer,1000,e)
i=winio@('%nl%3ta%^14bt[&change_line]&',change_line)
i=winio@('%nl%3ta%^14bt[&delete_line]&',delete_line)
i=winio@('%nl%3ta%^14bt[&end_line ]',end_line)
! if(e(13).eq.1.and.ikey.eq.97) call function change_line() ! Is there a possibility to call this function here??
stop
END
!--------------------------------------
integer function delete_line()
use edit_modul
include<windows.ins>
call SCROLL_EDIT_BUFFER@(E,1,1)
call edit_delete_lines@(e,1)
delete_line = 1
end
!--------------------------------------
integer function change_line()
use edit_modul
include<windows.ins>
character buffer1*13
buffer1(1:12) = buffer(1:12)
buffer1(13:13) = char(0)
i=winio@('%12.1eb[no_hscroll] &',buffer1,1000)
i=winio@('%`6bt[OK]')
if(i.eq.1)then
buffer(1:12) = buffer1(1:12)
call window_update@(buffer)
endif
change_line = 1
end
!--------------------------------------
integer function end_line()
use edit_modul
include<windows.ins>
end_line = 0
end
!-------------------------------------------
integer function keyboard_monitor()
use edit_modul
include<windows.ins>
ikey = clearwin_info@('KEYBOARD_KEY')
write(*,*)'ikey = ',ikey
if(ikey.eq.99)write(*,*)'c pressed !!!'
! if(ikey.eq.97) call function change_line() ! Is there a possibility to call this function??
keyboard_monitor=1
end