//listview 列表视图
import win.ui.ctrl.metaProperty;//导入控件属性元表支持 
namespace win.ui.ctrl;  

//_LVM_FIRST =@0x1000/*_LVM_FIRST*/
//_LVM_SETEXTENDEDLISTVIEWSTYLE = @4150/*_LVM_SETEXTENDEDLISTVIEWSTYLE*/
class listview{
    ctor(parent,tParam){ 
    	if(tParam){
    		tParam.cls = "SysListView32"; 
    		//tParam.style |= 3/*_LVS_LIST*/ | 0x4000 /*_LVS_NOCOLUMNHEADER*/
   			if(tParam.edge)   
					tParam.exstyle |= 0x200/*_WS_EX_CLIENTEDGE*/;  
					
   			select(tParam.mode){
				case "icon" 
					tParam.style |= 0x0/*_LVS_ICON*/
				case "list"  
					tParam.style |= 0x3/*_LVS_LIST*/
				case "smallicon" 
					tParam.style |= 0x2/*_LVS_SMALLICON*/            
				else {
					tParam.style |= 0x1/*_LVS_REPORT*/
				} 					
			}  
			
			if( tParam.editable )
				tParam.style |= 0x200/*_LVS_EDITLABELS*/
				
			if(tParam.hscroll)
				tParam.style |= 0x800/*_LVS_ALIGNLEFT*/ 
			if(tParam.vscroll)
				tParam.style |= 0x0/*_LVS_ALIGNTOP*/
				
			if(tParam.msel===false)
    			tParam.style |= 0x4/*_LVS_SINGLESEL*/
    			
    		if(tParam.asel===null || tParam.asel ) 
    			tParam.style |= 0x8/*_LVS_SHOWSELALWAYS*/
		}  
    } 
    @_metaProperty;
}

namespace listview{ 

	LVCOLUMN = class { /* 列 */
		INT mask = 0;
		int fmt; 
		int cx; 
		string	text; 
		int cchTextMax; 
		int iSubItem = 1; 
		int iImage;
		int iOrder;
	}
	LVITEM = class { /* 项 */
		INT mask = 0; 
		int iItem = 1; 
		int iSubItem = 1; 
		INT state; 
		INT stateMask; 
		string text; 
		int cchTextMax; 
		int iImage; 
		int lParam;
		int iIndent;
		int iGroupId;
		INT cColumns;
		struct	puColumns = ::POINT();
	}
	var LVITEM = LVITEM;
	LVITEM_AUTOSET_MASK = function(item){ 
		if( item.text !== null ){ 
			item.cchTextMax = #item.text;
		}
		if( item.cchTextMax ){
			item.mask |= 1/*_TVIF_TEXT*/ 
			item.cchTextMax = #item.text
		}
		if( item.iIndent !==null ){
			item.mask |= 0x10/*_LVIF_INDENT*/
		}
		if( item.state !==null ){
			item.mask |= 0x8/*_LVIF_STATE*/  
		} 
		if( item.iImage !==null ){
			item.mask |=  0x2/*_LVIF_IMAGE*/ 
		}
		if( item.cColumns !==null ){
			item.mask |= 0x200/*_LVIF_COLUMNS*/
		}
		if( item.lParam !==null ){
			item.mask |= 0x4/*_LVIF_PARAM*/
		}
	}; 
	LVCOLUMN_AUTOSET_MASK = function(col){ 
		if( col.text ){
			col.cchTextMax = #col.text;
		}
		if( col.cchTextMax ){
			col.mask |= 0x4/*_LVCF_TEXT*/; 
		}
		if( col.iImage ){ 
			col.mask |= 0x10/*_LVCF_IMAGE*/;
		}  
		if(col.cx){
			col.mask |= 0x2/*_LVCF_WIDTH*/  
		}
		if(col.fmt){
			col.mask |= 0x1/*_LVCF_FMT*/ 
		}
	}; 	 
	
	class LVTILEVIEWINFO {
		INT cbSize = 40;
		INT dwMask;
		INT dwFlags;
		struct  sizeTile = ::SIZE();
		int   cLines;
		struct  rcLabelMargin = ::RECT();
	};
	class NMLISTVIEW {
    	struct hdr = ..win.ui.NMHDR();
 		int iItem = 1;
    	int iSubItem = 1;
    	INT uNewState;
    	INT uOldState;
    	INT uChanged;
    	struct ptAction = ::POINT();
    	int lParam;
	} 
	class LVFINDINFO{
  		INT flags ;
  		string psz;
  		int lParam;
  		struct pt = ::POINT();
  		INT vkDirection;
	} 
	 
	namespace NMLISTVIEW{
		CODES = {
			[0xFFFFFF93/*_LVN_BEGINDRAG*/] = 1;
			[0xFFFFFF91/*_LVN_BEGINRDRAG*/] = 1;
			[0xFFFFFF94/*_LVN_COLUMNCLICK*/] = 1;
			[0xFFFFFF5C/*_LVN_COLUMNDROPDOWN*/] = 1;
			[0xFFFFFF5A/*_LVN_COLUMNOVERFLOWCLICK*/] = 1;
			[0xFFFFFF64/*_LVN_MARQUEEBEGIN*/] = 1;
			[0xFFFFFF98/*_LVN_DELETEALLITEMS*/] = 1;
			[0xFFFFFF99/*_LVN_DELETEITEM*/] = 1;
			[0xFFFFFF87/*_LVN_HOTTRACK*/] = 1;
			[0xFFFFFF9A/*_LVN_INSERTITEM*/] = 1;
			[0xFFFFFF9B/*_LVN_ITEMCHANGED*/] = 1;
			[0xFFFFFF9C/*_LVN_ITEMCHANGING*/] = 1;
			[0xFFFFFFFE/*_NM_CLICK*/] = 1;
			[0xFFFFFFFD/*_NM_DBLCLK*/] = 1;
			[0xFFFFFFFB/*_NM_RCLICK*/] = 1;
			[0xFFFFFFFA/*_NM_RDBLCLK*/] = 1;
		}
	};
	
	class LVHITTESTINFO{
    	struct pt = ::POINT();
    	INT flags;
    	int iItem; 
    	int iSubItem;   
    	int iGroup;  
	}  ;

	class LV_DISPINFO { 
		struct hdr = ..win.ui.NMHDR(); 
		struct item =  LVITEM();
  	}  
 
	_metaProperty = ..win.ui.ctrl.metaProperty( 
		
		count = {
			_get = function(){  
				return ::SendMessage(owner.hwnd, 0x1004/*_LVM_GETITEMCOUNT*/ )  
			} 
		}; 
	 	getImageList = function (wParam=0/*_LVSIL_NORMAL*/) {
				return topointer( ::SendMessageInt(owner.hwnd, 0x1002/*_LVM_GETIMAGELIST*/, wParam, 0) ); 
		};
		setImageList = function (v,wParam=0/*_LVSIL_NORMAL*/) { 
				return topointer( ::SendMessage(owner.hwnd, 0x1003/*_LVM_SETIMAGELIST*/,topointer(wParam), v) );
		};
		findItem = function(str,start=-1,sub=true,wrap=true){
			var info = LVFINDINFO()
			info.psz = str;
			info.flags  = 2/*_LVFI_STRING*/ 
			if(sub) info.flags |= 4/*_LVFI_SUBSTRING*/ 
			if(wrap) info.flags || 0x20/*_LVFI_WRAP*/
			return ::SendMessageByStruct(owner.hwnd,0x100D/*_LVM_FINDITEM*/,start,info) + 1;
		};
		getItem = function(item,iSubItem){
			if(type(item)!=type.table){
				item = ..table.mixin( LVITEM(), { iItem = item;iSubItem=iSubItem} )
				item.mask = 1/*_TVIF_TEXT*/ 
			}
			elseif(!item._struct)
				item = ..table.mixin( LVITEM(), item )
				
			if(item.mask & 0x1/*_LVIF_TEXT*/ ){
				if( ! item.cchTextMax )
					item.cchTextMax = 100;
				item.text = ..raw.malloc(item.cchTextMax)
			} 
			if(!item.iItem){
				item.iItem = owner.getFocused();
				if(!item.iItem)
					return;
			}
			item.iItem--;
			item.iSubItem--;
			
			if( ::SendMessageByStruct(owner.hwnd,0x1005/*_LVM_GETITEM*/,0,item) ){ 
				item.iItem++;
				item.iSubItem++;
				return item;
			}
		}; 
		setItem = function(item,iItem,iSubItem){
			if(!item._struct)
				item = ..table.mixin( LVITEM(), item , { iItem = item;iSubItem=iSubItem} )
			 
			if(!item.iItem){
				item.iItem = owner.getFocused();
				if(!item.iItem)
					return;
			}
			item.iItem--;
			item.iSubItem--;
				
			LVITEM_AUTOSET_MASK(item);
			var ret = !!( ::SendMessageByStruct(owner.hwnd,0x110D/*_TVM_SETITEMA*/,0,item) ) 
			item.iItem++;
			item.iSubItem++;
			return ret;
		};
		getNextItem = function(i=0,flags=0x0/*_LVNI_ALL*/){ 
			return ::SendMessageInt(owner.hwnd,0x100C/*_LVM_GETNEXTITEM*/,i-1,::MAKELONG(flags,0)) + 1;
		};  　
		getFocused  = function(){  
			return owner.getNextItem( ,0x1/*_LVNI_FOCUSED*/)
		}; 
		getSelection  = function(i){
			return owner.getNextItem(i,0x2/*_LVNI_SELECTED*/)
		};
		hitTest = function(x,y,screen=false){
			if( !(x && y) ){
				x,y = ..win.getMessagePos();
				screen = true;
			}
			var hinfo = LVHITTESTINFO();
			if(screen) x,y = ..win.toClient(owner.hwnd,x,y)
			hinfo.pt.x = x; hinfo.pt.y = y; 
			if( ::SendMessageByStruct(owner.hwnd,0x1012/*_LVM_HITTEST*/,0,hinfo) )
				return hinfo.iItem,hinfo.iSubItem,hinfo.flags;
		};
		getNotifyMessage = function(code,ptr){
			if(type(ptr)!=type.pointer)
				error("请指定有效NMLISTVIEW指针",2) 
				
			..io.print(code,NMLISTVIEW.CODES[code] );
			if( NMLISTVIEW.CODES[code] ){ 
				var nm =  ..raw.convert(ptr,NMLISTVIEW() ); 
				nm.iItem++;
				nm.iSubItem++;
				return nm;
			}   
		} ;
		getNotifyDispInfo = function(code,ptr){
			if(type(ptr)!=type.pointer)
				error("请指定有效NMTREEVIEW指针",2) 
				
			if(code==0xFFFFFF6A/*_LVN_GETDISPINFO*/ || ( code == 0xFFFFFF96/*_LVN_ENDLABELEDIT*/) ){ 
				var nm =  ..raw.convert(ptr,LV_DISPINFO() );  
				nm.item.iItem ++;
				return nm;
			} 
		} ; 
		editLable = function(i){
			owner.setFocus()
			return ::SendMessageInt(owner.hwnd,0x1017/*_LVM_EDITLABEL*/,( i : owner.getFocused()) -1,0);
		} 
		getEditControl = function(){
			var hwnd = ::SendMessage(owner.hwnd, 0x1018/*_LVM_GETEDITCONTROL*/ )
			if( hwnd ){
				var ctrl = ..win.ui.ctrl.edit();
				ctrl.hwnd = hwnd;
				return ctrl;
			} 
		} 
		setTileViewInfo = function(inf){
			if(! inf[["rcLabelMargin"]])
				error("参数不是合法的LVTILEVIEWINFO()结构体",2)
				
			::SendMessageByStruct(owner.hwnd,0x10A2/*_LVM_SETTILEVIEWINFO*/,0,inf);
		}
		getTileViewInfo = function(){
			var inf = LVTILEVIEWINFO();
			::SendMessageByStruct(owner.hwnd,0x10A3/*_LVM_GETTILEVIEWINFO*/,0,inf);
			return inf;
		}   
		columnCount = {
			_get = function () {
				var hwndHeader = ::SendMessageInt(owner.hwnd, 0x101F/*_LVM_GETHEADER*/, 0, 0);
				return ::SendMessageInt(hwndHeader, 0x1200, 0, 0);
			}
		}
		getColumn= function(col,ind){
			if(type(col)!=type.table){
				col = LVCOLUMN(); 
			}
			elseif(!col._struct)
				col = ..table.mixin( LVCOLUMN(), col )
			
			LVCOLUMN_AUTOSET_MASK(col);	
			if(col.mask & 0x4/*_LVCF_TEXT*/ ){
				if( ! col.cchTextMax )
					col.cchTextMax = 100;
				col.text = ..raw.malloc(col.cchTextMax)
			}    
			
			if( ::SendMessageByStruct(owner.hwnd, 0x1019/*_LVM_GETCOLUMN*/, ind - 1, col) ){ 
				if(col.text){
					col.text = ..string.str(col.text);
				};
				return col;
			}
		}; 
		setColumn = function(col,ind){
			if(!col._struct)
				col = ..table.mixin( LVCOLUMN(), col  )
			 
			col.iSubItem = ind
			if( !col.iSubItem ){
				col.iSubItem = owner.columnCount; 
			} 
			
			col.iSubItem--; 
			LVCOLUMN_AUTOSET_MASK(col);
			var ret = ::SendMessageByStruct(owner.hwnd, 0x101A/*_LVM_SETCOLUMN*/, col.iSubItem, col); 
			return ret;
		};
		insertColumn = function (text /* 文本 */,width /* 列宽 */, ind /* 插入位置 */,fmt){
			ind := owner.columnCount + 1;
			var col = LVCOLUMN();
			col.mask = 0x8/*_LVCF_SUBITEM*/;  
			col.iSubItem = ind;
			col.cx	= width>0?width:0;
			col.fmt	= fmt;
			
			var t = type(text);
			if( t=="string" ){
				col.text = text; 
			}
			elseif( t=="number" ){
				col.iImage = text; 
			}
			elseif( t=="table" ){
				..table.mixin(col,text); 
			}
			LVCOLUMN_AUTOSET_MASK(col); 
			var ret ::SendMessageByStruct(owner.hwnd, 0x101B/*_LVM_INSERTCOLUMNA*/,ind - 1, col);
			if( width < 0 ){
				owner.fillParent(ind);
			}
		};
		delColumn = function (ind) {
			return ::SendMessageInt(owner.hwnd, 0x101C/*_LVM_DELETECOLUMN*/, ind - 1, 0);
		};
		setColumnText = function (ind, text) {
			return owner.setColumn( {text = text} ,ind ); 
		};
		getColumnText = function (ind,max=100) { 
			var col = owner.getColumn({
				cchTextMax = max;
			},ind); 
			return col[["text"]];
		};
		getItemRect = function(row,col,rc,code=0/*_LVIR_BOUNDS*/){ 
			rc := ::RECT();
			if(col){ rc.top = col-1; }
			rc.left = code;  
			var ret = ::SendMessageByStruct(owner.hwnd,(col!==null)?0x1038/*_LVM_GETSUBITEMRECT*/ : 0x100E/*_LVM_GETITEMRECT*/,(row : owner.selIndex)-1,rc); 
			return rc;
		};
		fillParent = function(ind){
			var c = owner.columnCount;
			ind := c;
			var rc = owner.clientRect;
			var width = rc.right - rc.left;
			var col = LVCOLUMN();
			col.mask = 0x2/*_LVCF_WIDTH*/;
			for(i=1;c;1){
				if( i != ind){
					col.mask = 0x2/*_LVCF_WIDTH*/; 
					if( !owner.getColumn(col,i) )
						return false;;
					width -= col.cx;
				} 
			} 
			col.cx = width;
			if( width > 0 ){
				 owner.setColumn( col ,ind); 
			}
		};
		addItem = function(text, ind, image = -1, state = -1, indent = 0, lParam = 0) {
			ind := owner.count + 1; 
			var item = LVITEM();
			item.iItem = ind-1; 
			item.iSubItem = 0
			item.iImage = image;
			item.state = (state + 1) * 4096;
			item.stateMask = 0xF000/*_LVIS_STATEIMAGEMASK*/ | 0x8/*_LVS_SHOWSELALWAYS*/;
			item.iIndent = indent;
			item.lParam	 = lParam;
			
			var textList;
			if( type(text) == "table" ){ 
				if(#text){
					textList = text
					item.text = textList[1]; 
				}
				else {
					..table.mixin(item,text); 
					if(type(item.text) == "table" ){
						textList = item.text;
						item.text = textList[1];
					}
				};
			}
			else {
				item.text = text;
			}
			
			LVITEM_AUTOSET_MASK(item); 
			var rowIndex = ::SendMessageByStruct(owner.hwnd, 0x1007/*_LVM_INSERTITEM*/, 0, item);
			if ( textList ) { 
				item.mask = 0x1/*_LVIF_TEXT*/;
				for (i = 2; #textList) {
					item.iSubItem = i - 1;
					item.text = textList[i];
					::SendMessageByStruct(owner.hwnd, 0x102E/*_LVM_SETITEMTEXT*/, rowIndex, item);
				}
			}
			return rowIndex+1;
		}
		delItem = function(ind){
			ind := owner.count;
			return ::SendMessageInt(owner.hwnd, 0x1008/*_LVM_DELETEITEM*/,ind-1,0); 
		}
		clear = function(){
			return ::SendMessage(owner.hwnd, 0x1009/*_LVM_DELETEALLITEMS*/); 
		} 
		setItemText = function (text,row=1,col=1 ) {
			var item		= LVITEM();
			item.mask		= 0x1/*_LVIF_TEXT*/;
			row--;
			if(type(text)!="table"){
				item.iSubItem	= col - 1;
				item.text	= text;
				return ::SendMessageByStruct(owner.hwnd, 0x102E/*_LVM_SETITEMTEXT*/, row, item);
			}
			else{
				for (i = 1; #text) {
					item.iSubItem = i-1;
					item.text = text[i];
					::SendMessageByStruct(owner.hwnd, 0x102E/*_LVM_SETITEMTEXT*/, row, item);
				}
			} 
		}
		getItemText = function ( row,col=1,len=0x104/*_MAX_PATH*/ ) {
			var item		= LVITEM();
			item.mask		= 0x1/*_LVIF_TEXT*/;
			item.iSubItem	= col-1;
			item.text	= ..raw.malloc(len);
			item.cchTextMax = len
			var len = ::SendMessageByStruct(owner.hwnd, 0x102D/*_LVM_GETITEMTEXT*/, row-1, item); 
			return ..string.left( item.text ,len);
		}
		items = {
			_get = function(){  
				tab = {}; 
				for(i=1;owner.count )
               		..table.push(tab,owner.getItemText(i)) 
				return tab;
			}
			_set = function( v ){ 
				owner.clear()
		    	for(i=1;#v )  
					owner.addItem(v[i])  
			} 	
		} 
		setItemPos = function ( ind,x,y ) { 
			return ::SendMessageInt(owner.hwnd,0x100F/*_LVM_SETITEMPOSITION*/,ind-1,y*65536+x);  
		}  
		setItemState = function(row,state=0,mask){
			var item = LVITEM();
			item.mask = 0x8/*_LVIF_STATE*/; 
			item.stateMask = mask===null?state:mask;
			item.state = state
			return ::SendMessageByStruct(owner.hwnd, 0x102B/*_LVM_SETITEMSTATE*/, row-1, item); 
		}
		getItemState = function(row,mask=0){
			return ::SendMessageInt(owner.hwnd, 0x102c/*LVM_GETITEMSTATE*/, row-1,mask)  
		}
		/** 保证显示某一 item **/
		ensureVisible = function (row) {
			::SendMessageInt(owner.hwnd, 0x1013/*_LVM_ENSUREVISIBLE*/, (row : owner.selIndex) - 1, 0);
		}
		
		/** 选中选择框 **/ 
		setSelected = function (row, selected=true) {
			return owner.setItemState(row,selected ? 0x2/*_LVIS_SELECTED*/ : 0,0x2/*_LVIS_SELECTED*/ ); 
		} 
		getSelected = function(row){
			return owner.getItemState(row,0x2/*_LVIS_SELECTED*/ ) == 0x2/*_LVIS_SELECTED*/ 
		} 
		getChecked = function(i){
    		return ( owner.getItemState(i,0xF000/*LVIS_STATEIMAGEMASK*/) >> 12 ) != 1;
		}
		setChecked = function(i,v=true){ 
			return owner.setItemState(i,( (v)?2:1 )<<12 ,0xF000/*LVIS_STATEIMAGEMASK*/) ;
		}
		selIndex = {
			_get = function(){  
				return ::SendMessageInt(owner.hwnd, 0x100C/*_LVM_GETNEXTITEM*/, -1, 0x1/*_LVNI_FOCUSED*/) + 1
			}
			_set = function( v ){
				return owner.setItemState( v,0x1/*_LVNI_FOCUSED*/)
			} 	
		}; 
		setExtended = function(ex,v=true){
			return ::SendMessageInt(owner.hwnd, 4150/*_LVM_SETEXTENDEDLISTVIEWSTYLE*/,ex,v?ex:0);
		}
		getExtended = function(ex=~0){
			return ::SendMessage(owner.hwnd, 0x1037/*_LVM_GETEXTENDEDLISTVIEWSTYLE*/) & ex;
		} 
		gridLines = { 
			/**
			_get = function(){
				return owner.getExtended(0x1/*_LVS_EX_GRIDLINES*/)
			} 
			**/
			_set = function( v ){  
				 owner.setExtended(0x1/*_LVS_EX_GRIDLINES*/,v)
			} 	
		};  
		fullRow = {
			/**
			_get = function(){
				return owner.getExtended(0x20/*_LVS_EX_FULLROWSELECT*/)
			} 
			**/
			_set = function( v ){  
				 owner.setExtended(0x20/*_LVS_EX_FULLROWSELECT*/,v)
			} 	
		};
	)
	
	namespace _metaProperty{
		getListViewNotifyMessage = getNotifyMessage;
		getListViewNotifyDispInfo = getNotifyDispInfo;
		getListViewItem = getItem;
		setListViewItem = setItem;
		getListViewColumn = getColumn;
		setListViewColumn = setColumn;
	};
}

/**intellisense()
!listview.cls = 设计时类名
!listview.className = 运行时类名 
!listview.getNotifyMessage() = !NMLISTVIEW.
!NMLISTVIEW.hdr = !nmhdl.
!NMLISTVIEW.ptAction = !point.
!NMLISTVIEW.iItem = 鼠标指向项的行号\n没有使用则为0
!NMLISTVIEW.iSubItem =  鼠标指向项的列序号\n没有使用则为0
!NMLISTVIEW.uNewState = 改变后状态\n由_LVIS_作为前缀的常量指定
!NMLISTVIEW.uOldState = 改变前状态\n由_LVIS_作为前缀的常量指定
!NMLISTVIEW.uChanged = 类似LVITEM结构体中的mask成员\n以LVIF_前缀的常量标明改变的属性
!NMLISTVIEW.lParam = 附加参数
!listview.getNotifyMessage(code,ptr) = 该函数限用于onnotify通知回调函数中\ncode参数为通知码，如果ptr指向NMLISTVIEW对象则返回该对象.
!listview.getNotifyDispInfo() = !LV_DISPINFO.
!LV_DISPINFO.hdr = !nmhdl.
!LV_DISPINFO.item = !lvitem.
!listview.getNotifyDispInfo(code,ptr) = 该函数限用于onnotify通知回调函数中\ncode参数为通知码，ptr参数为NMHDR指针\n如果NMHDR指针指向LV_DISPINFO对象则返回该对象,否则返回空值
!lvitem.mask = 掩码
!lvitem.iItem = 行
!lvitem.iSubItem = 列
!lvitem.state = 状态码 
!lvitem.stateMask = 状态掩码
!lvitem.text = 文本
!lvitem.cchTextMax = 文本长度
!lvitem.iImage = 图像索引
!lvitem.lParam = 附加值
!lvitem.iIndent = 缩进
!lvitem.iGroupId = 组ID
!lvitem.cColumns = 列数目
!lvitem.puColumns = !point. 
!treeview.getItem(__) = 返回LVITEM对象,参数为TVITEM结构体或指定部分成员的table对象.\n可选使用参数一指定行号,参考二指定列序号,\n不指定项目序号,则取当前焦点节点作为序号
!treeview.setItem(__) = 更新项节点,参数为LVITEM结构体或指定部分成员的table对象\n如果参数未指定节点序号，则取当前焦点节点序号\n成功返回true;\n此函数可自动检测非空成员并自动设定相应mask位
!treeview.getItem() = !lvitem.
!lvcolumn.mask = 掩码;
!lvcolumn.fmt = 样式
!lvcolumn.cx = 宽度
!lvcolumn.text = 文本 
!lvcolumn.cchTextMax = 文本缓冲区长度
!lvcolumn.iSubItem = 列号 
!lvcolumn.iImage = 图像索引
!lvcolumn.iOrder = 序号
!treeview.getColumn() = !lvcolumn.
!treeview.getColumn(.(列参数表,列序号) = 参数一可以为空,或是指定LVCOLUMN结构体成员键值的参数表,\n返回LVCOLUMN结构体
!treeview.setColumn(.(列参数表,列序号) = 参数一指定LVCOLUMN结构体成员键值的参数表,\n也可以是LVCOLUMN结构体对象,自动设置掩码参数.
!listview.getEditControl() = 开始编辑时返回编辑控件,\n此控件在完成编辑后会自动销毁,不必手动销毁\n取消发送_WM_CANCELMODE消息即可\n!edit.
?.getEditControl = !edit.
!listview.editLable(.(行序号) = 编辑指定项,无参数则编辑选定项\n此函数成功返回编辑文本框句柄\n返则返回0
!listview.setItemPos(__/*项索引*/,x,y) = 设置图标项坐标
!listview.count = 项目总数
!listview.insertColumn(.(列名,列宽,位置,样式) = 第一个参数可以是标题字符串,图像索引,\n或者指定LVCOLUMN结构体成员的table对象,\n\n其他参数都是可选参数,\n样式使用_LVCFMT_前缀的常量指定,\n例如_LVCFMT_LEFT为文本左对齐,\n如果列宽为-1,则自动调用fillParent(ind)函数填充剩余空间
!listview.setColumnText(.(位置,文本) = 设置指定列文本
!listview.getColumnText(__) = 取指定列文本
!listview.delColumn(__) = 删除指定列
!listview.columnCount = 列总数
!listview.clear() = 清空所有项
!listview.getNextItem(.(起始索引,选项) = 参数二为一个或多个 _LVNI_ 前缀的常量合并\n默认为 _LVNI_ALL \n起始索引默认为0 
!listview.getFocused() = 获取当前焦点项位置,返回数值,\n不存在焦点项则返回0
!listview.getSelection(.(起始索引)  = 获取选中项,返回数值,\n不存在选中项则返回0\n可选指定起始索引,默认为0		
!listview.addItem(.(文本,位置,图像索引) = 位置参数可省略,默认为count值\n图像索引可省略,默认为-1\n文本可以是一个指定多列文本的table数组\n返回新增项行号
!listview.addItem(.(LVITEM对象,位置) = 参数一可以是指定一个或多个LVITEM对象成员的table对象\ntext成员指定项目文件,也可以是一个指定多列文本的数组\n位置参数可省略,默认为count值
!listview.setItemText(.(文本,行,列) = 设置项目指定列文本,\n参数一也可是指定多列文本的数组(table对象),\n其他参数可选
!listview.getItemText(.(行,列,缓冲区长度) = 列默认值为1,缓冲区最大字符数默认为100
!listview.getItemRect(.(行,列,RECT,选项) = 返回表示项目表示项目区块的RECT结构体,\n除第一个参数以外,其他参数为可选参数,\n如果不指定列则返回所在行区块,\n使用_LVIR_前缀常量指定选项
!listview.getItemRect() = !rect.
!listview.hitTest(.(x坐标,y坐标,是否屏幕坐标) = 该函数返回指定坐标的行号,列号,参数三可省略,默认为false.\n如果不指定任何参数，则自动调用 win.getMessagePos() 获取消息坐标\n第三个返回值指定测试结果,该值可以是一个或多个_LVHT_开头的常量组合\n
!listview.setSelected(__/*项索引*/) = 选中项
!listview.setSelected(__/*项索引*/,false) = 取消选中项
!listview.getSelected(__/*项索引*/) = 指定项是否选中状态
!listview.getChecked(__) = 返回指定索引项是否选中
!listview.setChecked(__) = 选定指定索引项
!listview.setItemState(.(项索引,状态位,掩码) = 设置状态,参数三如果省略则使用参数二的值.
!listview.getItemState(.(项索引,状掩码 ) = 读取状态值
!listview.selIndex = 当前选定项索引
!listview.fullRow = 是否选中整行
!listview.hwnd = 控件句柄
!listview.id = 控件ID
!listview._parentForm = 控件所在的父窗口(指win.form对象)\n!winform.
!listview.getParent() = 返回父窗口\n!static.
!listview.setParent(__/*控件对象*/) = 改变父窗口 
!listview.disabled = 是否禁用
!listview.left = 左侧坐标
!listview.right = 右侧坐标
!listview.top = 顶部坐标
!listview.bottom = 底部坐标 
!listview.width = 宽度
!listview.height = 高度
!listview.redraw() = 刷新
!listview.show(true__) = 显示控件
!listview.getRect() = 控件区块位置(::RECT结构体)
!listview.getRect(true) = 控件屏幕区块位置(::RECT结构体)  
!listview.setRect(rc) = 设置控件区块位置(::RECT结构体)  
!listview.setRect(rc,true) = 设置控件屏幕区块位置(::RECT结构体)
!listview.getClientRect() =  控件客户区块位置(::RECT结构体)\n!rect.
!listview.getFont() = 控件字体(::LOGFONT结构体)\n!logfont.
!listview.setFont(__/*指定字体*/) = 指定LOGFONT字体对象,或逻辑字体句柄 
!listview.setFont(混入字体属性) = @.setFont(point=10;name="宋体");
!listview.clientRect =  获取控件客户区块位置(::RECT结构体)
!listview.theme = 外观主题,例如\nwinform.button.theme = "Explorer"\nwinform.button.theme = false
!listview.delItem(__) = 参数为数值，移除指定索引的项目
!listview.items = 列表项集合(第一列)\ntable对象 
!listview.modifyStyle(.(remove,add) = 如果指定第三个参数，则使用此参数调用::SetWidnowPos 
!listview.modifyStyleEx(.(remove,add) = 如果指定第三个参数，则使用此参数调用::SetWidnowPos
!listview.capture = 是否捕获全局鼠标消息
!listview.close() = 关闭控件窗口
!listview.setExtended(_LVS_EX__) = 启用树视图指定扩展样式
!listview.setExtended(_LVS_EX__,false) = 取消树视图指定扩展样式
!listview.getExtended() = 获取树视图扩展样式
!listview.getExtended(_LVS_EX__) = 获取树视图指定扩展样式
!listview.gridLines = 是否显示网格线
!listview.setFocus() = 设置焦点 
!listview.setPos(.(x坐标,y坐标,宽,高,插入位置,参数) = 调整窗口位置或排序,所有参数可选\n同时指定x,y坐标则移动位置\n同时指定宽高则改变大小\n指定插入位置(句柄或_HWND前缀常量)则调整Z序
!listview.getPos() = 返回相对坐标,宽,高\nx,y,cx,cy=win.getPos(hwnd)
!listview.getTileViewInfo() = 返回排列显示相关属性
!listview.setTileViewInfo() = 设置排列显示相关属性
!listview.ensureVisible() = 保证显示选中项
!listview.ensureVisible(__) = 保证显示指定项
!listview.getImageList( _LVSIL__ ) = 获取指定图像列表,\n可选使用 _LVSIL_ 前缀常量指定类型
!listview.setImageList( imageList,_LVSIL__ ) = 获取指定图像列表,\n可选使用 _LVSIL_ 前缀常量指定类型
!listview.fillParent(.(列序号) = 使指定列自适应父窗口宽度,\n如果不指定列默认调整最后一列
!listview.adjust = @.adjust = function(cx,cy){
    winform.listview.fillParent(/*列序号*/);
}
!listview.findItem(.(查找文本,起始位置,是否部份匹配,是否返回查询) = 使用文本查找匹配项,\n除第一个参数外,所有参数可选,默认支持部份匹配,并查找所有项
!listview.addCtrl = @.addCtrl(\n	edit ={ cls="edit";left=0;top=0;right=50;bottom=50;autoResize=false ;hide=1;edge=1;  }\n)
?win.ui.ctrl.listview  =!listview.
win.ui.ctrl.listview() = 列表视图\n!listview.
!tileviewinfo.dwMask = @.dwMask = _LVTVIM__ ;
!tileviewinfo.dwFlags = @.dwFlags = _LVTVIF__ ;
!tileviewinfo.sizeTile = !size.
!tileviewinfo.cLines = 行数
!tileviewinfo.rcLabelMargin = !rect.
?.getTileViewInfo = !tileviewinfo.


_LVTVIM_TILESIZE=@0x1/*_LVTVIM_TILESIZE*/
_LVTVIM_COLUMNS=@0x2/*_LVTVIM_COLUMNS*/
_LVTVIM_LABELMARGIN=@0x4/*_LVTVIM_LABELMARGIN*/
_LVTVIF_AUTOSIZE=@0x0/*_LVTVIF_AUTOSIZE*/
_LVTVIF_FIXEDWIDTH=@0x1/*_LVTVIF_FIXEDWIDTH*/
_LVTVIF_FIXEDHEIGHT=@0x2/*_LVTVIF_FIXEDHEIGHT*/
_LVTVIF_FIXEDSIZE=@0x3/*_LVTVIF_FIXEDSIZE*/
_LVTVIF_EXTENDED=@0x4/*_LVTVIF_EXTENDED*/

_LVS_ICON=@0x0/*_LVS_ICON*/
_LVS_REPORT=@0x1/*_LVS_REPORT*/
_LVS_SMALLICON=@0x2/*_LVS_SMALLICON*/
_LVS_LIST=@0x3/*_LVS_LIST*/
_LVS_TYPEMASK=@0x3/*_LVS_TYPEMASK*/
_LVS_SINGLESEL=@0x4/*_LVS_SINGLESEL*/
_LVS_SHOWSELALWAYS=@0x8/*_LVS_SHOWSELALWAYS*/
_LVS_SORTASCENDING=@0x10/*_LVS_SORTASCENDING*/
_LVS_SORTDESCENDING=@0x20/*_LVS_SORTDESCENDING*/
_LVS_SHAREIMAGELISTS=@0x40/*_LVS_SHAREIMAGELISTS*/
_LVS_NOLABELWRAP=@0x80/*_LVS_NOLABELWRAP*/
_LVS_AUTOARRANGE=@0x100/*_LVS_AUTOARRANGE*/
_LVS_EDITLABELS=@0x200/*_LVS_EDITLABELS*/
_LVS_OWNERDATA=@0x1000/*_LVS_OWNERDATA*/
_LVS_NOSCROLL=@0x2000/*_LVS_NOSCROLL*/
_LVS_TYPESTYLEMASK=@0xFC00/*_LVS_TYPESTYLEMASK*/
_LVS_ALIGNTOP=@0x0/*_LVS_ALIGNTOP*/
_LVS_ALIGNLEFT=@0x800/*_LVS_ALIGNLEFT*/
_LVS_ALIGNMASK=@0xC00/*_LVS_ALIGNMASK*/
_LVS_OWNERDRAWFIXED=@0x400/*_LVS_OWNERDRAWFIXED*/
_LVS_NOCOLUMNHEADER=@0x4000/*_LVS_NOCOLUMNHEADER*/
_LVS_NOSORTHEADER=@0x8000/*_LVS_NOSORTHEADER*/
_LVS_EX_GRIDLINES=@0x1/*_LVS_EX_GRIDLINES*/
_LVS_EX_SUBITEMIMAGES=@0x2/*_LVS_EX_SUBITEMIMAGES*/
_LVS_EX_CHECKBOXES=@0x4/*_LVS_EX_CHECKBOXES*/
_LVS_EX_TRACKSELECT=@0x8/*_LVS_EX_TRACKSELECT*/
_LVS_EX_HEADERDRAGDROP=@0x10/*_LVS_EX_HEADERDRAGDROP*/
_LVS_EX_FULLROWSELECT=@0x20/*_LVS_EX_FULLROWSELECT*/
_LVS_EX_ONECLICKACTIVATE=@0x40/*_LVS_EX_ONECLICKACTIVATE*/
_LVS_EX_TWOCLICKACTIVATE=@0x80/*_LVS_EX_TWOCLICKACTIVATE*/
_LVS_EX_FLATSB=@0x100/*_LVS_EX_FLATSB*/
_LVS_EX_REGIONAL=@0x200/*_LVS_EX_REGIONAL*/
_LVS_EX_INFOTIP=@0x400/*_LVS_EX_INFOTIP*/
_LVS_EX_UNDERLINEHOT=@0x800/*_LVS_EX_UNDERLINEHOT*/
_LVS_EX_UNDERLINECOLD=@0x1000/*_LVS_EX_UNDERLINECOLD*/
_LVS_EX_MULTIWORKAREAS=@0x2000/*_LVS_EX_MULTIWORKAREAS*/
_LVS_EX_LABELTIP=@0x4000/*_LVS_EX_LABELTIP*/
_LVS_EX_BORDERSELECT=@0x8000/*_LVS_EX_BORDERSELECT*/
_LVS_EX_DOUBLEBUFFER=@0x10000/*_LVS_EX_DOUBLEBUFFER*/
_LVS_EX_HIDELABELS=@0x20000/*_LVS_EX_HIDELABELS*/
_LVS_EX_SINGLEROW=@0x40000/*_LVS_EX_SINGLEROW*/
_LVS_EX_SNAPTOGRID=@0x80000/*_LVS_EX_SNAPTOGRID*/
_LVS_EX_SIMPLESELECT=@0x100000/*_LVS_EX_SIMPLESELECT*/
_LVS_EX_JUSTIFYCOLUMNS=@0x200000/*_LVS_EX_JUSTIFYCOLUMNS*/
_LVS_EX_TRANSPARENTBKGND=@0x400000/*_LVS_EX_TRANSPARENTBKGND*/
_LVS_EX_TRANSPARENTSHADOWTEXT=@0x800000/*_LVS_EX_TRANSPARENTSHADOWTEXT*/
_LVS_EX_AUTOAUTOARRANGE=@0x1000000/*_LVS_EX_AUTOAUTOARRANGE*/
_LVS_EX_HEADERINALLVIEWS=@0x2000000/*_LVS_EX_HEADERINALLVIEWS*/
_LVS_EX_AUTOCHECKSELECT=@0x8000000/*_LVS_EX_AUTOCHECKSELECT*/
_LVS_EX_AUTOSIZECOLUMNS=@0x10000000/*_LVS_EX_AUTOSIZECOLUMNS*/
_LVS_EX_COLUMNSNAPPOINTS=@0x40000000/*_LVS_EX_COLUMNSNAPPOINTS*/
_LVS_EX_COLUMNOVERFLOW=@0x80000000/*_LVS_EX_COLUMNOVERFLOW*/

_LVM_SETUNICODEFORMAT=@0x2005/*_LVM_SETUNICODEFORMAT*/
_LVM_GETUNICODEFORMAT=@0x2006/*_LVM_GETUNICODEFORMAT*/
_LVM_GETBKCOLOR=@0x1000/*_LVM_GETBKCOLOR*/
_LVM_SETBKCOLOR=@0x1001/*_LVM_SETBKCOLOR*/
_LVM_GETIMAGELIST=@0x1002/*_LVM_GETIMAGELIST*/
_LVM_SETIMAGELIST=@0x1003/*_LVM_SETIMAGELIST*/
_LVM_GETITEMCOUNT=@0x1004/*_LVM_GETITEMCOUNT*/
_LVM_GETITEM=@0x1005/*_LVM_GETITEM*/
_LVM_SETITEM=@0x1006/*_LVM_SETITEM*/
_LVM_INSERTITEM=@0x1007/*_LVM_INSERTITEM*/
_LVM_DELETEITEM=@0x1008/*_LVM_DELETEITEM*/
_LVM_DELETEALLITEMS=@0x1009/*_LVM_DELETEALLITEMS*/
_LVM_GETCALLBACKMASK=@0x100A/*_LVM_GETCALLBACKMASK*/
_LVM_SETCALLBACKMASK=@0x100B/*_LVM_SETCALLBACKMASK*/
_LVM_GETNEXTITEM=@0x100C/*_LVM_GETNEXTITEM*/
_LVM_FINDITEM=@0x100D/*_LVM_FINDITEM*/
_LVM_GETITEMRECT=@0x100E/*_LVM_GETITEMRECT*/
_LVM_SETITEMPOSITION=@0x100F/*_LVM_SETITEMPOSITION*/
_LVM_GETITEMPOSITION=@0x1010/*_LVM_GETITEMPOSITION*/
_LVM_GETSTRINGWIDTH=@0x1011/*_LVM_GETSTRINGWIDTH*/
_LVM_HITTEST=@0x1012/*_LVM_HITTEST*/
_LVM_ENSUREVISIBLE=@0x1013/*_LVM_ENSUREVISIBLE*/
_LVM_SCROLL=@0x1014/*_LVM_SCROLL*/
_LVM_REDRAWITEMS=@0x1015/*_LVM_REDRAWITEMS*/
_LVM_ARRANGE=@0x1016/*_LVM_ARRANGE*/
_LVM_EDITLABEL=@0x1017/*_LVM_EDITLABEL*/
_LVM_GETEDITCONTROL=@0x1018/*_LVM_GETEDITCONTROL*/
_LVM_GETCOLUMN=@0x1019/*_LVM_GETCOLUMN*/
_LVM_SETCOLUMN=@0x101A/*_LVM_SETCOLUMN*/
_LVM_INSERTCOLUMN=@0x101B/*_LVM_INSERTCOLUMNA*/
_LVM_DELETECOLUMN=@0x101C/*_LVM_DELETECOLUMN*/
_LVM_GETCOLUMNWIDTH=@0x101D/*_LVM_GETCOLUMNWIDTH*/
_LVM_SETCOLUMNWIDTH=@0x101E/*_LVM_SETCOLUMNWIDTH*/
_LVM_GETHEADER=@0x101F/*_LVM_GETHEADER*/
_LVM_CREATEDRAGIMAGE=@0x1021/*_LVM_CREATEDRAGIMAGE*/
_LVM_GETVIEWRECT=@0x1022/*_LVM_GETVIEWRECT*/
_LVM_GETTEXTCOLOR=@0x1023/*_LVM_GETTEXTCOLOR*/
_LVM_SETTEXTCOLOR=@0x1024/*_LVM_SETTEXTCOLOR*/
_LVM_GETTEXTBKCOLOR=@0x1025/*_LVM_GETTEXTBKCOLOR*/
_LVM_SETTEXTBKCOLOR=@0x1026/*_LVM_SETTEXTBKCOLOR*/
_LVM_GETTOPINDEX=@0x1027/*_LVM_GETTOPINDEX*/
_LVM_GETCOUNTPERPAGE=@0x1028/*_LVM_GETCOUNTPERPAGE*/
_LVM_GETORIGIN=@0x1029/*_LVM_GETORIGIN*/
_LVM_UPDATE=@0x102A/*_LVM_UPDATE*/
_LVM_SETITEMSTATE=@0x102B/*_LVM_SETITEMSTATE*/
_LVM_GETITEMSTATE=@0x102C/*_LVM_GETITEMSTATE*/
_LVM_GETITEMTEXT=@0x102D/*_LVM_GETITEMTEXT*/
_LVM_SETITEMTEXT=@0x102E/*_LVM_SETITEMTEXT*/
_LVM_SETITEMCOUNT=@0x102F/*_LVM_SETITEMCOUNT*/
_LVM_SORTITEMS=@0x1030/*_LVM_SORTITEMS*/
_LVM_SETITEMPOSITION32=@0x1031/*_LVM_SETITEMPOSITION32*/
_LVM_GETSELECTEDCOUNT=@0x1032/*_LVM_GETSELECTEDCOUNT*/
_LVM_GETITEMSPACING=@0x1033/*_LVM_GETITEMSPACING*/
_LVM_GETISEARCHSTRING=@0x1034/*_LVM_GETISEARCHSTRING*/
_LVM_SETICONSPACING=@0x1035/*_LVM_SETICONSPACING*/
_LVM_GETEXTENDEDLISTVIEWSTYLE=@0x1037/*_LVM_GETEXTENDEDLISTVIEWSTYLE*/
_LVM_GETSUBITEMRECT=@0x1038/*_LVM_GETSUBITEMRECT*/
_LVM_SUBITEMHITTEST=@0x1039/*_LVM_SUBITEMHITTEST*/
_LVM_SETCOLUMNORDERARRAY=@0x103A/*_LVM_SETCOLUMNORDERARRAY*/
_LVM_GETCOLUMNORDERARRAY=@0x103B/*_LVM_GETCOLUMNORDERARRAY*/
_LVM_SETHOTITEM=@0x103C/*_LVM_SETHOTITEM*/
_LVM_GETHOTITEM=@0x103D/*_LVM_GETHOTITEM*/
_LVM_SETHOTCURSOR=@0x103E/*_LVM_SETHOTCURSOR*/
_LVM_GETHOTCURSOR=@0x103F/*_LVM_GETHOTCURSOR*/
_LVM_APPROXIMATEVIEWRECT=@0x1040/*_LVM_APPROXIMATEVIEWRECT*/
_LVM_SETWORKAREAS=@0x1041/*_LVM_SETWORKAREAS*/
_LVM_GETWORKAREAS=@0x1046/*_LVM_GETWORKAREAS*/
_LVM_GETNUMBEROFWORKAREAS=@0x1049/*_LVM_GETNUMBEROFWORKAREAS*/
_LVM_GETSELECTIONMARK=@0x1042/*_LVM_GETSELECTIONMARK*/
_LVM_SETSELECTIONMARK=@0x1043/*_LVM_SETSELECTIONMARK*/
_LVM_SETHOVERTIME=@0x1047/*_LVM_SETHOVERTIME*/
_LVM_GETHOVERTIME=@0x1048/*_LVM_GETHOVERTIME*/
_LVM_SETTOOLTIPS=@0x104A/*_LVM_SETTOOLTIPS*/
_LVM_GETTOOLTIPS=@0x104E/*_LVM_GETTOOLTIPS*/
_LVM_SORTITEMSEX=@0x1051/*_LVM_SORTITEMSEX*/
_LVM_SETBKIMAGEA=@0x1044/*_LVM_SETBKIMAGEA*/
_LVM_GETBKIMAGEA=@0x1045/*_LVM_GETBKIMAGEA*/
_LVM_SETSELECTEDCOLUMN=@0x108C/*_LVM_SETSELECTEDCOLUMN*/
_LVM_SETVIEW=@0x108E/*_LVM_SETVIEW*/
_LVM_GETVIEW=@0x108F/*_LVM_GETVIEW*/
_LVM_INSERTGROUP=@0x1091/*_LVM_INSERTGROUP*/
_LVM_SETGROUPINFO=@0x1093/*_LVM_SETGROUPINFO*/
_LVM_GETGROUPINFO=@0x1095/*_LVM_GETGROUPINFO*/
_LVM_REMOVEGROUP=@0x1096/*_LVM_REMOVEGROUP*/
_LVM_MOVEGROUP=@0x1097/*_LVM_MOVEGROUP*/
_LVM_GETGROUPCOUNT=@0x1098/*_LVM_GETGROUPCOUNT*/
_LVM_GETGROUPINFOBYINDEX=@0x1099/*_LVM_GETGROUPINFOBYINDEX*/
_LVM_MOVEITEMTOGROUP=@0x109A/*_LVM_MOVEITEMTOGROUP*/
_LVM_GETGROUPRECT=@0x1062/*_LVM_GETGROUPRECT*/
_LVM_SETGROUPMETRICS=@0x109B/*_LVM_SETGROUPMETRICS*/
_LVM_GETGROUPMETRICS=@0x109C/*_LVM_GETGROUPMETRICS*/
_LVM_ENABLEGROUPVIEW=@0x109D/*_LVM_ENABLEGROUPVIEW*/
_LVM_SORTGROUPS=@0x109E/*_LVM_SORTGROUPS*/
_LVM_INSERTGROUPSORTED=@0x109F/*_LVM_INSERTGROUPSORTED*/
_LVM_REMOVEALLGROUPS=@0x10A0/*_LVM_REMOVEALLGROUPS*/
_LVM_HASGROUP=@0x10A1/*_LVM_HASGROUP*/
_LVM_GETGROUPSTATE=@0x105C/*_LVM_GETGROUPSTATE*/
_LVM_GETFOCUSEDGROUP=@0x105D/*_LVM_GETFOCUSEDGROUP*/
_LVM_SETTILEVIEWINFO=@0x10A2/*_LVM_SETTILEVIEWINFO*/
_LVM_GETTILEVIEWINFO=@0x10A3/*_LVM_GETTILEVIEWINFO*/
_LVM_SETTILEINFO=@0x10A4/*_LVM_SETTILEINFO*/
_LVM_GETTILEINFO=@0x10A5/*_LVM_GETTILEINFO*/
_LVM_SETINSERTMARK=@0x10A6/*_LVM_SETINSERTMARK*/
_LVM_GETINSERTMARK=@0x10A7/*_LVM_GETINSERTMARK*/
_LVM_INSERTMARKHITTEST=@0x10A8/*_LVM_INSERTMARKHITTEST*/
_LVM_GETINSERTMARKRECT=@0x10A9/*_LVM_GETINSERTMARKRECT*/
_LVM_SETINSERTMARKCOLOR=@0x10AA/*_LVM_SETINSERTMARKCOLOR*/
_LVM_GETINSERTMARKCOLOR=@0x10AB/*_LVM_GETINSERTMARKCOLOR*/
_LVM_SETINFOTIP=@0x10AD/*_LVM_SETINFOTIP*/
_LVM_GETSELECTEDCOLUMN=@0x10AE/*_LVM_GETSELECTEDCOLUMN*/
_LVM_ISGROUPVIEWENABLED=@0x10AF/*_LVM_ISGROUPVIEWENABLED*/
_LVM_GETOUTLINECOLOR=@0x10B0/*_LVM_GETOUTLINECOLOR*/
_LVM_SETOUTLINECOLOR=@0x10B1/*_LVM_SETOUTLINECOLOR*/
_LVM_CANCELEDITLABEL=@0x10B3/*_LVM_CANCELEDITLABEL*/
_LVM_MAPINDEXTOID=@0x10B4/*_LVM_MAPINDEXTOID*/
_LVM_MAPIDTOINDEX=@0x10B5/*_LVM_MAPIDTOINDEX*/
_LVM_ISITEMVISIBLE=@0x10B6/*_LVM_ISITEMVISIBLE*/
_LVM_GETEMPTYTEXT=@0x10CC/*_LVM_GETEMPTYTEXT*/
_LVM_GETFOOTERRECT=@0x10CD/*_LVM_GETFOOTERRECT*/
_LVM_GETFOOTERINFO=@0x10CE/*_LVM_GETFOOTERINFO*/
_LVM_GETFOOTERITEMRECT=@0x10CF/*_LVM_GETFOOTERITEMRECT*/
_LVM_GETFOOTERITEM=@0x10D0/*_LVM_GETFOOTERITEM*/
_LVM_GETITEMINDEXRECT=@0x10D1/*_LVM_GETITEMINDEXRECT*/
_LVM_SETITEMINDEXSTATE=@0x10D2/*_LVM_SETITEMINDEXSTATE*/
_LVM_GETNEXTITEMINDEX=@0x10D3/*_LVM_GETNEXTITEMINDEX*/
_LVM_SETBKIMAGE=@0x1044/*_LVM_SETBKIMAGE*/
_LVM_GETBKIMAGE=@0x1045/*_LVM_GETBKIMAGE*/

_LVCF_FMT=@0x1/*_LVCF_FMT*/
_LVCF_WIDTH=@0x2/*_LVCF_WIDTH*/
_LVCF_TEXT=@0x4/*_LVCF_TEXT*/
_LVCF_SUBITEM=@0x8/*_LVCF_SUBITEM*/
_LVCF_IMAGE=@0x10/*_LVCF_IMAGE*/
_LVCF_ORDER=@0x20/*_LVCF_ORDER*/
_LVCF_MINWIDTH=@0x40/*_LVCF_MINWIDTH*/
_LVCF_DEFAULTWIDTH=@0x80/*_LVCF_DEFAULTWIDTH*/
_LVCF_IDEALWIDTH=@0x100/*_LVCF_IDEALWIDTH*/

_LVCFMT_LEFT=@0x0/*_LVCFMT_LEFT*/
_LVCFMT_RIGHT=@0x1/*_LVCFMT_RIGHT*/
_LVCFMT_CENTER=@0x2/*_LVCFMT_CENTER*/
_LVCFMT_JUSTIFYMASK=@0x3/*_LVCFMT_JUSTIFYMASK*/
_LVCFMT_IMAGE=@0x800/*_LVCFMT_IMAGE*/
_LVCFMT_BITMAP_ON_RIGHT=@0x1000/*_LVCFMT_BITMAP_ON_RIGHT*/
_LVCFMT_COL_HAS_IMAGES=@0x8000/*_LVCFMT_COL_HAS_IMAGES*/
_LVCFMT_FIXED_WIDTH=@0x100/*_LVCFMT_FIXED_WIDTH*/
_LVCFMT_NO_DPI_SCALE=@0x40000/*_LVCFMT_NO_DPI_SCALE*/
_LVCFMT_FIXED_RATIO=@0x80000/*_LVCFMT_FIXED_RATIO*/
_LVCFMT_LINE_BREAK=@0x100000/*_LVCFMT_LINE_BREAK*/
_LVCFMT_FILL=@0x200000/*_LVCFMT_FILL*/
_LVCFMT_WRAP=@0x400000/*_LVCFMT_WRAP*/
_LVCFMT_NO_TITLE=@0x800000/*_LVCFMT_NO_TITLE*/
_LVCFMT_TILE_PLACEMENTMASK=@0x300000/*_LVCFMT_TILE_PLACEMENTMASK*/
_LVCFMT_SPLITBUTTON=@0x1000000/*_LVCFMT_SPLITBUTTON*/

_LVIF_TEXT=@0x1/*_LVIF_TEXT*/
_LVIF_IMAGE=@0x2/*_LVIF_IMAGE*/
_LVIF_PARAM=@0x4/*_LVIF_PARAM*/
_LVIF_STATE=@0x8/*_LVIF_STATE*/
_LVIF_INDENT=@0x10/*_LVIF_INDENT*/
_LVIF_NORECOMPUTE=@0x800/*_LVIF_NORECOMPUTE*/
_LVIF_GROUPID=@0x100/*_LVIF_GROUPID*/
_LVIF_COLUMNS=@0x200/*_LVIF_COLUMNS*/
_LVIF_COLFMT=@0x10000/*_LVIF_COLFMT*/

_LVIS_FOCUSED=@0x1/*_LVIS_FOCUSED*/
_LVIS_SELECTED=@0x2/*_LVIS_SELECTED*/
_LVIS_CUT=@0x4/*_LVIS_CUT*/
_LVIS_DROPHILITED=@0x8/*_LVIS_DROPHILITED*/
_LVIS_GLOW=@0x10/*_LVIS_GLOW*/
_LVIS_ACTIVATING=@0x20/*_LVIS_ACTIVATING*/
_LVIS_OVERLAYMASK=@0xF00/*_LVIS_OVERLAYMASK*/
_LVIS_STATEIMAGEMASK=@0xF000/*_LVIS_STATEIMAGEMASK*/

_LVNI_ALL=@0x0/*_LVNI_ALL*/
_LVNI_FOCUSED=@0x1/*_LVNI_FOCUSED*/
_LVNI_SELECTED=@0x2/*_LVNI_SELECTED*/
_LVNI_CUT=@0x4/*_LVNI_CUT*/
_LVNI_DROPHILITED=@0x8/*_LVNI_DROPHILITED*/
_LVNI_STATEMASK=@0xF/*_LVNI_STATEMASK*/
_LVNI_VISIBLEORDER=@0x10/*_LVNI_VISIBLEORDER*/
_LVNI_PREVIOUS=@0x20/*_LVNI_PREVIOUS*/
_LVNI_VISIBLEONLY=@0x40/*_LVNI_VISIBLEONLY*/
_LVNI_SAMEGROUPONLY=@0x80/*_LVNI_SAMEGROUPONLY*/
_LVNI_ABOVE=@0x100/*_LVNI_ABOVE*/
_LVNI_BELOW=@0x200/*_LVNI_BELOW*/
_LVNI_TOLEFT=@0x400/*_LVNI_TOLEFT*/
_LVNI_TORIGHT=@0x800/*_LVNI_TORIGHT*/
_LVNI_DIRECTIONMASK=@0xF00/*_LVNI_DIRECTIONMASK*/
_LVSIL_NORMAL=@0/*_LVSIL_NORMAL*/
_LVSIL_SMALL=@1/*_LVSIL_SMALL*/
_LVSIL_STATE=@2/*_LVSIL_STATE*/
_LVSIL_GROUPHEADER=@3/*_LVSIL_GROUPHEADER*/

_LVIR_BOUNDS=@0/*_LVIR_BOUNDS*/
_LVIR_ICON=@1/*_LVIR_ICON*/
_LVIR_LABEL=@2/*_LVIR_LABEL*/
_LVIR_SELECTBOUNDS=@3/*_LVIR_SELECTBOUNDS*/
 
_LVN_LAST=@FFFFFF39/*_LVN_LAST*/
_LVN_FIRST=@0xFFFFFF9C/*_LVN_FIRST*/
_LVN_ITEMCHANGING=@0xFFFFFF9C/*_LVN_ITEMCHANGING*/
_LVN_ITEMCHANGED=@0xFFFFFF9B/*_LVN_ITEMCHANGED*/
_LVN_INSERTITEM=@0xFFFFFF9A/*_LVN_INSERTITEM*/
_LVN_DELETEITEM=@0xFFFFFF99/*_LVN_DELETEITEM*/
_LVN_DELETEALLITEMS=@0xFFFFFF98/*_LVN_DELETEALLITEMS*/
_LVN_BEGINLABELEDITA=@0xFFFFFF97/*_LVN_BEGINLABELEDITA*/
_LVN_BEGINLABELEDITW=@0xFFFFFF51/*_LVN_BEGINLABELEDITW*/
_LVN_ENDLABELEDITA=@0xFFFFFF96/*_LVN_ENDLABELEDITA*/
_LVN_ENDLABELEDITW=@0xFFFFFF50/*_LVN_ENDLABELEDITW*/
_LVN_COLUMNCLICK=@0xFFFFFF94/*_LVN_COLUMNCLICK*/
_LVN_BEGINDRAG=@0xFFFFFF93/*_LVN_BEGINDRAG*/
_LVN_BEGINRDRAG=@0xFFFFFF91/*_LVN_BEGINRDRAG*/
_LVN_ODCACHEHINT=@0xFFFFFF8F/*_LVN_ODCACHEHINT*/
_LVN_ITEMACTIVATE=@0xFFFFFF8E/*_LVN_ITEMACTIVATE*/
_LVN_ODSTATECHANGED=@0xFFFFFF8D/*_LVN_ODSTATECHANGED*/
_LVN_ODFINDITEM=@0xFFFFFF68/*_LVN_ODFINDITEM*/
_LVN_HOTTRACK=@0xFFFFFF87/*_LVN_HOTTRACK*/
_LVN_GETDISPINFOA=@0xFFFFFF6A/*_LVN_GETDISPINFOA*/
_LVN_GETDISPINFOW=@0xFFFFFF4F/*_LVN_GETDISPINFOW*/
_LVN_SETDISPINFOA=@0xFFFFFF69/*_LVN_SETDISPINFOA*/
_LVN_SETDISPINFOW=@0xFFFFFF4E/*_LVN_SETDISPINFOW*/
_LVN_BEGINLABELEDIT=@0xFFFFFF97/*_LVN_BEGINLABELEDIT*/
_LVN_ENDLABELEDIT=@0xFFFFFF96/*_LVN_ENDLABELEDIT*/
_LVN_GETDISPINFO=@0xFFFFFF6A/*_LVN_GETDISPINFO*/
_LVN_SETDISPINFO=@0xFFFFFF69/*_LVN_SETDISPINFO*/
_LVN_COLUMNDROPDOWN=@0xFFFFFF5C/*_LVN_COLUMNDROPDOWN*/
_LVN_COLUMNOVERFLOWCLICK=@0xFFFFFF5A/*_LVN_COLUMNOVERFLOWCLICK*/
_LVN_MARQUEEBEGIN=@0xFFFFFF64/*_LVN_MARQUEEBEGIN*/

_LVFI_PARAM=@1/*_LVFI_PARAM*/
_LVFI_STRING=@2/*_LVFI_STRING*/
_LVFI_SUBSTRING=@4/*_LVFI_SUBSTRING*/
_LVFI_WRAP=@0x20/*_LVFI_WRAP*/
_LVFI_NEARESTXY=@0x40/*_LVFI_NEARESTXY*/

_LVHT_NOWHERE=@1/*_LVHT_NOWHERE*/
_LVHT_ONITEMICON=@2/*_LVHT_ONITEMICON*/
_LVHT_ONITEMLABEL=@4/*_LVHT_ONITEMLABEL*/
_LVHT_ONITEMSTATEICON=@8/*_LVHT_ONITEMSTATEICON*/
_LVHT_ONITEM=@0xE/*_LVHT_ONITEM*/
_LVHT_ABOVE=@8/*_LVHT_ABOVE*/
_LVHT_BELOW=@0x10/*_LVHT_BELOW*/
_LVHT_TORIGHT=@0x20/*_LVHT_TORIGHT*/
_LVHT_TOLEFT=@0x40/*_LVHT_TOLEFT*/
end intellisense**/