Silverfrost Forums

Welcome to our forums

editable %lv with go_down_on_return

10 Dec 2018 8:44 #22949

I am struggling with a Problem connected with %lv. Each time I use %lv with options edit_cells and* go_down_on_return* I get a crash when I edit a cell and then press the return button. The corresponding error message looks like:

[URL=https://www.bilder-upload.eu/bild-fb7dc8-1544430989.png.html]https://www.bilder-upload.eu/thumb/fb7dc8-1544430989.png[/URL]

Unfortunately I was not yet able to reproduce this error in a simple test program, so it seems that there is another dependency.

Compiled as 32bit, the program runs fine.

Ralf

10 Dec 2018 9:52 #22950

Ralf

Are you using the latest DLLs? I think that there was a recent fix in this context. Or was it you that previously reported a problem with 64 bit %lv?

11 Dec 2018 12:39 #22958

Paul,

I am using the 8.40 release, no recent DLL-update. I reported another %lv Problem in July ('editable listview controls'), which you have fixed in the meantime.

Ralf

11 Dec 2018 4:04 #22961

Ralf

If you are able to provide me with a link to a download of your code then I will aim to track down the problem for you.

18 Dec 2018 9:58 #23022

Paul,

I was able to track down the problem. It occurs in combination with a %og OpenGl graphic area. Here is the code of my simple example:

      winapp 
!=======================================================================
!=======================================================================
      Program Test_Listview
!=======================================================================  
!      use lvt
      
      integer :: winio@
      integer :: iw
      integer(kind=7)         :: handle_ogl_mainwin
      
      external :: c_func
      
      iw = winio@ ('%ca[Test lv]&')
      iw = winio@ ('%mn[Listview]&',c_func)
      iw = winio@ ('%`og[depth16]', 400, 300, handle_ogl_mainwin)
  
      stop
  
      end  

!=======================================================================================================================
      integer function c_func()
!======================================================================================================================= 
!      use lvt
      
      integer :: winio@
      integer :: iw, nitems, listview

      integer,dimension(2)  :: isel
      character(len=20),dimension(0:2) :: items
      
      external :: c_func
      
      items(0) = '|Header|Value'
      items(1) = '|Test |1.0'
      items(2) = '|Test2|2.0'
      
      nitems = 3
      listview = 1
            
      iw = winio@ ('%ca[lv]&')
      iw = winio@ ('%lv[single_selection,edit_cells, go_down_on_return]',    &
                                150,100,items,nitems,iselect_legend,listview)
 
      end
      

I have linked it with the following linker file (lw):

lo testlv
lo tlv.res
windows
file Test_lv

the resource file tlv.rc is an empty file

the makefile has the following lines:

src tlv.rc /r
ftn95 /64 testlv.f95
slink64 @lw

The crach occurs, if I open the listview from the menu, click into one of the cells and then press return.

18 Dec 2018 10:47 #23023

Ralf

It works OK for me.

I will upload the DLLs that I am using later today.

18 Dec 2018 3:15 #23024

Ralf

Here is a new set of DLLs for you to try...

https://www.dropbox.com/s/9wl57uvg1ct9hp8/newDLLs28.zip?dl=0

18 Dec 2018 5:34 #23027

Paul

I have still the same Problem with the new DLLs, but I was wrong: I linked an old tlv.res, i.e. the corresponding file tlv.rc contains:

  24  clrwin.manifest

and clrwin.manifest contains:

<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
 
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'> 
  <trustInfo xmlns='urn:schemas-microsoft-com:asm.v2'> 
    <security> 
      <requestedPrivileges> 
        <requestedExecutionLevel level='asInvoker' uiAccess='false'/> 
      </requestedPrivileges> 
    </security> 
  </trustInfo> 
  <dependency> 
    <dependentAssembly> <assemblyIdentity type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' 
                                          processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'/> 
    </dependentAssembly> 
  </dependency> 
</assembly>
19 Dec 2018 8:12 #23034

Ralf

It fails for me when using the given manifest. I have included a fix in ClearWin+ and uploaded a new DLL here...

https://www.dropbox.com/s/po9v8y6q9k4e61v/clearwin64.dll?dl=0

It would be interesting to know if you get a different theme (i.e. appearance) when using a manifest. In other words, when porting to 64 bits, has Microsoft ported both versions of the common controls DLL with their different themes?

If not then the manifest can be omitted.

20 Dec 2018 10:04 #23038

Paul

thanks for the DLL-update. The fix works fine in my testprogram, as well as in my complex program. Yes, I get a different appearance when I use the manifest. Especially buttons and radiobuttons look like typical Win 10 controls, otherwise they have a more old-style appearance.

Ralf

Please login to reply.