Silverfrost Forums

Welcome to our forums

update of owner draw graphics box %dw

23 Oct 2019 7:59 #24553

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.

28 Oct 2019 11:00 #24581

I plan to take a look at this shortly.

29 Oct 2019 7:40 #24589

This bug has now been fixed for the next release of salflibc.dll.

Strangely, it was not a regression but a bug that has been there from the outset. Something else must have changed in order to expose it.

Please login to reply.