internal void SetItemState(int index, uint data, ListViewItemStates mask) { var _ms_lvi = new LVITEMA(); _ms_lvi.stateMask = mask; _ms_lvi.state = data; SendMessage(Handle, ListViewMessages.LVM_SETITEMSTATE, index, ref _ms_lvi); }
public void SetSubItemImage(int itemIndex, int subItemIndex, int imageIndex) { var lvItem = new LVITEMA(); lvItem.mask = ListViewItemMask.LVIF_IMAGE; lvItem.iItem = itemIndex; lvItem.iSubItem = subItemIndex; lvItem.iImage = imageIndex; SendMessageLVI(Handle, (int)ListViewMessages.LVM_SETITEM, 0, ref lvItem); }
private static extern int SendMessage(IntPtr hWnd, ListViewMessages Msg, int wParam, ref LVITEMA lvitem);
private static extern IntPtr SendMessageLVI(IntPtr hWnd, int msg, int wParam, ref LVITEMA lvi);
public void SetSubItemImage(int itemIndex, int subItemIndex, int imageIndex) { var lvItem = new LVITEMA(); lvItem.mask = ListViewItemMask.LVIF_IMAGE; lvItem.iItem = itemIndex; lvItem.iSubItem = subItemIndex; lvItem.iImage = imageIndex; SendMessageLVI(Handle, (int) ListViewMessages.LVM_SETITEM, 0, ref lvItem); }