public HDITEM(HeaderItemMask mask = HeaderItemMask.All) { if (mask.IsFlagSet(HeaderItemMask.Text)) { cchTextMax = 1024; InteropUtil.AllocString(ref pszText, ref cchTextMax); } }
public LVCOLUMN(ListViewColumMask mask) { this.mask = mask; if (mask.IsFlagSet(ListViewColumMask.Text)) { InteropUtil.AllocString(ref pszText, ref cchTextMax); } }
public LVBKIMAGE(ListViewBkImageFlag flags) { ulFlags = flags; if (ulFlags.IsFlagSet(ListViewBkImageFlag.SourceUrl)) { cchImageMax = 1024; InteropUtil.AllocString(ref pszImage, ref cchImageMax); } }
public LVITEM(int item, int subitem = 0, ListViewItemMask mask = ListViewItemMask.All, ListViewItemState stateMask = ListViewItemState.None) { if (mask.IsFlagSet(ListViewItemMask.Text)) { cchTextMax = 1024; InteropUtil.AllocString(ref pszText, ref cchTextMax); } iItem = item; iSubItem = subitem; this.stateMask = stateMask; }
/*public LVGROUP(ListViewGroupEx grp) * { * this.cbSize = Marshal.SizeOf(this); * this.Header = grp.Header; * this.ID = grp.ID; * this.SetAlignment(grp.HeaderAlignment, grp.FooterAlignment); * this.Footer = grp.Footer; * this.DescriptionBottom = grp.DescriptionBottom; * this.DescriptionTop = grp.DescriptionTop; * this.Subtitle = grp.Subtitle; * this.Task = grp.Task; * if (grp.TitleImageIndex > 0) * { * this.iTitleImage = grp.TitleImageIndex; * this.mask |= ListViewGroupMask.TitleImage; * } * ListViewGroupState s, m; * grp.GetSetState(out m, out s); * if (s != ListViewGroupState.Normal) * { * this.stateMask = m; * this.state = s; * this.mask |= ListViewGroupMask.State; * } * }*/ public LVGROUP(ListViewGroupMask mask = ListViewGroupMask.None, string header = null) { cbSize = Marshal.SizeOf(this); this.mask = mask; if (header != null) { this.Header = header; } else if ((mask & ListViewGroupMask.Header) != 0) { InteropUtil.AllocString(ref pszHeader, ref cchHeader); } if ((mask & ListViewGroupMask.Footer) != 0) { InteropUtil.AllocString(ref pszFooter, ref cchFooter); } if ((mask & ListViewGroupMask.Subtitle) != 0) { InteropUtil.AllocString(ref pszSubtitle, ref cchSubtitle); } if ((mask & ListViewGroupMask.Task) != 0) { InteropUtil.AllocString(ref pszTask, ref cchTask); } if ((mask & ListViewGroupMask.DescriptionBottom) != 0) { InteropUtil.AllocString(ref pszDescriptionBottom, ref cchDescriptionBottom); } if ((mask & ListViewGroupMask.DescriptionTop) != 0) { InteropUtil.AllocString(ref pszDescriptionTop, ref cchDescriptionTop); } }