Notifications
Clear all

[Closed] get listview items from max ui

I´m trying to get the text of the items of a listview. I think i have to use the LVM_GETITEMTEXT message:
https://msdn.microsoft.com/en-us/library/windows/desktop/bb761055%28v=vs.85%29.aspx
But i cant figure out how to create the LVITEM structure and send it as an argument.
This is my code at the moment:

actionMan.executeAction 0 "59226"  -- Customize User Interface
 cuiw_handle = (windows.getChildHWND 0 ("Customize User Interface"))[1]   -- get the handle of the dialog
 childhandles = UIAccessor.GetChildWindows cuiw_handle		-- get the handles of the ui elements in the dialog
 
 LVM_SCROLL = 4116
 LVM_GETITEMTEXT = 4141
 	
 windows.sendMessage childhandles[220] LVM_SCROLL 0 500		-- scroll the listview to check if the handle is correct
 
 itemclass = dotNetObject "System.Windows.Forms.ListViewItem"
 windows.sendMessage childhandles[220] LVM_GETITEMTEXT 0 itemclass		-- try to get the text on the items

Does someone know how to use the LVM_GETITEMTEXT message in maxscript?