I have a problem to update the content of a owner draw graphic box. Up to compiler release 7.xx it was possible to update the box with
call window_update@ (my_dc)
See the following Example:
WINAPP
INCLUDE <windows.ins>
COMMON /device/ my_dc
INTEGER(7) my_dc
EXTERNAL plot
my_dc=get_bitmap_dc@(50,50)
i=winio@ ('%ww[no_border]&')
i=winio@('%mn[Plot]&',plot)
i=winio@ ('%pv%fr&',50,50)
i=winio@('%dw %bt[OK]',my_dc)
END
!==================
INTEGER*4 FUNCTION plot()
!==================
COMMON /device/ my_dc
INTEGER(7) my_dc
plot = 2
CALL draw_line (my_dc)
END
!=====================
SUBROUTINE draw_line (ihandle)
!=====================
STDCALL POLYLINE 'Polyline' (VAL,REF,VAL):LOGICAL*4
INTEGER(7) ihandle
INTEGER*4, DIMENSION(2,2) :: ixx
LOGICAL*4 :: logo
INTEGER*4 :: iny2 = 0
SAVE iny2
iny2 = iny2 + 10
ixx(1,1) = 0
ixx(2,1) = 0
ixx(1,2) = 50
ixx(2,2) = iny2
logo = polyline (ihandle, ixx(1,1), 2)
call window_update@ (ihandle)
RETURN
END
Compiled with release 8.xx the graphic box is not updated, when a line was drawn by pressing the 'Plot'-command. It is updated, if the window is resized (therefore I added the resizable MIDI Frame). If I copy an old salflibc.dll (from 7.xx) into the program-directory, the program works as expected.