<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to make your ListView columns reorderable</title>
	<atom:link href="http://www.christec.co.nz/blog/archives/310/feed" rel="self" type="application/rss+xml" />
	<link>http://www.christec.co.nz/blog/archives/310</link>
	<description>Development for a mobile world - Making a quality platform one application at a time</description>
	<lastBuildDate>Fri, 12 Mar 2010 05:38:21 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Le Sage</title>
		<link>http://www.christec.co.nz/blog/archives/310/comment-page-1#comment-9428</link>
		<dc:creator>Le Sage</dc:creator>
		<pubDate>Fri, 04 Jul 2008 10:18:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.christec.co.nz/blog/archives/310#comment-9428</guid>
		<description>Thanks redwolf, except that...
SetAllowDraggableColumns has to be static,
SETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 54, has to be replaced by SETEXTENDEDLISTVIEWSTYLE = FIRST + 54,
HwndUtil isn&#039;t provided (maybe using Microsoft.WindowsCE.Forms.MessageWindow would be what you want?),
LVS_NOSCROLL has to be replaced by LVS.NOSCROLL,
msg.Msg = LVM.SETEXTENDEDLISTVIEWSTYLE; needs an int cast.
:)</description>
		<content:encoded><![CDATA[<p>Thanks redwolf, except that&#8230;<br />
SetAllowDraggableColumns has to be static,<br />
SETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 54, has to be replaced by SETEXTENDEDLISTVIEWSTYLE = FIRST + 54,<br />
HwndUtil isn&#8217;t provided (maybe using Microsoft.WindowsCE.Forms.MessageWindow would be what you want?),<br />
LVS_NOSCROLL has to be replaced by LVS.NOSCROLL,<br />
msg.Msg = LVM.SETEXTENDEDLISTVIEWSTYLE; needs an int cast.<br />
:)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: redwolf</title>
		<link>http://www.christec.co.nz/blog/archives/310/comment-page-1#comment-8049</link>
		<dc:creator>redwolf</dc:creator>
		<pubDate>Thu, 05 Jun 2008 19:52:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.christec.co.nz/blog/archives/310#comment-8049</guid>
		<description>GGGGGGGGGGGGGGGGRRRRRRRRRRRREEEEEEEEAAAAAAAAAAAAATTTTTTTTT
Because you are so great i will give you my code where i wrapped dat shit up, plus adding background changing + trasparency dehavior. Keep up the good work!

public static class ListViewUtil
    {
        private const uint CLR_NONE = 0xFFFFFFFF;

        public static void SetBackgroundImage(ListView listView, Bitmap bitmap)
        {
            LVBKIMAGE lvBkImage = new LVBKIMAGE();
            lvBkImage.ulFlags = LVBKIF.SOURCE_HBITMAP &#124; LVBKIF.STYLE_TILE;
            lvBkImage.hbm = bitmap.GetHbitmap();
            lvBkImage.cchImageMax = 0;
            lvBkImage.xOffsetPercent = 0;
            lvBkImage.yOffsetPercent = 0;

            Message msg = Message.Create(listView.Handle, (int)LVM.SETBKIMAGEW, // LVM_SETBKIMAGE,
            (IntPtr)0, Marshal.AllocCoTaskMem(Marshal.SizeOf(lvBkImage)));
            Marshal.StructureToPtr(lvBkImage, msg.LParam, false);
            MessageWindow.SendMessage(ref msg);
            Marshal.FreeCoTaskMem(msg.LParam);
        }

        public static void SetBackgroundTransparent(ListView listView)
        {
            HwndUtil.SendMessage(listView.Handle, (int)LVM.SETBKCOLOR, 0, CLR_NONE);
        }

        public static void SetTextBackgroundTransparent(ListView listView)
        {
            HwndUtil.SendMessage(listView.Handle, (int)LVM.SETTEXTBKCOLOR, 0, CLR_NONE);
        }

        public void SetAllowDraggableColumns(ListView lv, bool enabled)
        {
            Message msg = new Message();
            msg.HWnd = lv.Handle;
            msg.Msg = LVM.SETEXTENDEDLISTVIEWSTYLE;
            msg.WParam = (IntPtr)LVS.NOSCROLL;
            msg.LParam = enabled ? (IntPtr)LVS_NOSCROLL : IntPtr.Zero;

            MessageWindow.SendMessage(ref msg);
        }

        public enum LVBKIF : int
        {
            SOURCE_NONE = 0,
            SOURCE_HBITMAP = 1,
            SOURCE_URL = 2,
            SOURCE_MASK = 3,
            STYLE_NORMAL = 0,
            STYLE_TILE = 0x10,
            STYLE_MASK = 0x10,
            FLAG_TILEOFFSET = 0x100
        }

        public enum LVBKIF_SOURCE : int
        {
            NONE = 0x0,
            HBITMAP = 0x1,
            URL = 0x2,
            MASK = 0x3
        }

        public enum LVBKIF_STYLE : int
        {
            NORMAL = 0x0,
            TILE = 0x10,
            MASK = 0x10
        }

        public enum LVBKIF_FLAG : int
        {
            TILEOFFSET = 0x100
        }

        public class LVBKIMAGE
        {
            public LVBKIF ulFlags = LVBKIF.SOURCE_NONE;
            public IntPtr hbm = IntPtr.Zero;
            public IntPtr pszImage = IntPtr.Zero;
            public uint cchImageMax = 0;
            public int xOffsetPercent = 100;
            public int yOffsetPercent = 100;
        };

        public enum LVA : int
        {
            DEFAULT = 0,
            ALIGNLEFT = 1,
            ALIGNTOP = 2,
            SNAPTOGRID = 5
        }

        public enum LVCFMT : int
        {
            LEFT = 0x0,
            RIGHT = 0x1,
            CENTER = 0x2,
            JUSTIFYMASK = 0x3,
            IMAGE = 0x800,
            BITMAP_ON_RIGHT = 0x1000,
            COL_HAS_IMAGES = 0x8000
        }

        public enum LVCF : int
        {
            FMT = 0x1,
            WIDTH = 0x2,
            TEXT = 0x4,
            IMAGE = 0x10,
            ORDER = 0x20,
            SUBITEM = 0x8,
        }

        public enum LVFI : int
        {
            PARAM = 0x1,
            STRING = 0x2,
            PARTIAL = 0x8,
            WRAP = 0x20,
            NEARESTXY = 0x40
        }

        [Flags]
        public enum LVHT : int
        {
            NOWHERE = 0x1,
            ONITEM = ONITEMICON &#124; ONITEMLABEL &#124; ONITEMSTATEICON,
            ONITEMICON = 0x2,
            ONITEMLABEL = 0x4,
            ONITEMSTATEICON = 0x8,
            ABOVE = 0x8,
            BELOW = 0x10,
            TORIGHT = 0x20,
            TOLEFT = 0x40
        }

        public enum LFIF : int
        {
            DI_SETITEM = 0x1000,
            IMAGE = 0x2,
            INDENT = 0x10,
            NORECOMPUTE = 0x800,
            PARAM = 0x4,
            STATE = 0x8,
            TEXT = 0x1
        }

        public enum LVIR : int
        {
            BOUNDS = 0,
            ICON = 1,
            LABEL = 2,
            SELECTBOUNDS = 3
        }

        public enum LVIS : int
        {
            FOCUSED = 0x1,
            CUT = 0x4,
            SELECTED = 0x2,
            DROPHILITED = 0x8,
            OVERLAYMASK = 0xF00,
            STATEIMAGEMASK = 0xF000
        }

        public enum LVM : int
        {
            FIRST = 0x1000,
            APPROXIMATEVIEWRECT = (FIRST + 64),
            ARRANGE = (FIRST + 22),

            CREATEDRAGIMAGE = (FIRST + 33),

            DELETEALLITEMS = (FIRST + 9),
            DELETECOLUMN = (FIRST + 28),

            DELETEITEM = (FIRST + 8),
            EDITLABELA = (FIRST + 23),

            EDITLABELW = (FIRST + 118),
            ENSUREVISIBLE = (FIRST + 19),

            FINDITEMA = (FIRST + 13),
            FINDITEMW = (FIRST + 83),

            GETBKCOLOR = (FIRST + 0),

            GETBKIMAGEA = (FIRST + 69),
            GETBKIMAGEW = (FIRST + 139),
            GETCALLBACKMASK = (FIRST + 10),
            GETCOLUMNA = (FIRST + 25),
            GETCOLUMNORDERARRAY = (FIRST + 59),

            GETCOLUMNW = (FIRST + 95),
            GETCOLUMNWIDTH = (FIRST + 29),

            GETCOUNTPERPAGE = (FIRST + 40),
            GETEDITCONTROL = (FIRST + 24),

            GETHEADER = (FIRST + 31),
            GETHOTCURSOR = (FIRST + 63),

            GETHOTITEM = (FIRST + 61),
            GETHOVERTIME = (FIRST + 72),

            GETIMAGELIST = (FIRST + 2),
            GETISEARCHSTRINGA = (FIRST + 52),

            GETISEARCHSTRINGW = (FIRST + 117),
            GETITEMCOUNT = (FIRST + 4),

            GETITEMPOSITION = (FIRST + 16),
            GETITEMSPACING = (FIRST + 51),

            GETITEMSTATE = (FIRST + 44),
            GETITEMTEXTA = (FIRST + 45),
            GETITEMTEXTW = (FIRST + 115),
            GETNEXTITEM = (FIRST + 12),
            GETORIGIN = (FIRST + 41),
            GETSELECTEDCOUNT = (FIRST + 50),

            GETSELECTIONMARK = (FIRST + 66),
            GETSTRINGWIDTHA = (FIRST + 17),
            GETSTRINGWIDTHW = (FIRST + 87),
            GETSUBITEMRECT = (FIRST + 56),
            GETTEXTBKCOLOR = (FIRST + 37),
            GETTEXTCOLOR = (FIRST + 35),
            GETTOPINDEX = (FIRST + 39),
            GETVIEWRECT = (FIRST + 34),
            GETWORKAREA = (FIRST + 70),
            HITTEST = (FIRST + 18),
            INSERTCOLUMNA = (FIRST + 27),

            INSERTCOLUMNW = (FIRST + 97),
            INSERTITEMA = (FIRST + 7),
            INSERTITEMW = (FIRST + 77),
            REDRAWITEMS = (FIRST + 21),
            SCROLL = (FIRST + 20),

            SETBKCOLOR = (FIRST + 1),
            SETBKIMAGEA = (FIRST + 68),

            SETBKIMAGEW = (FIRST + 138),
            SETCALLBACKMASK = (FIRST + 11),
            SETCOLUMNA = (FIRST + 26),
            SETCOLUMNORDERARRAY = (FIRST + 58),
            SETCOLUMNW = (FIRST + 96),
            SETCOLUMNWIDTH = (FIRST + 30),
            SETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 54,
            SETHOTCURSOR = (FIRST + 62),
            SETHOTITEM = (FIRST + 60),
            SETHOVERTIME = (FIRST + 71),
            SETICONSPACING = (FIRST + 53),
            SETIMAGELIST = (FIRST + 3),
            SETITEMCOUNT = (FIRST + 47),

            SETITEMPOSITION = (FIRST + 15),
            SETITEMPOSITION32 = (FIRST + 49),
            SETITEMSTATE = (FIRST + 43),

            SETITEMTEXTA = (FIRST + 46),
            SETITEMTEXTW = (FIRST + 116),
            SETSELECTIONMARK = (FIRST + 67),
            SETTEXTBKCOLOR = (FIRST + 38),

            SETTEXTCOLOR = (FIRST + 36),
            SETWORKAREA = (FIRST + 65),
            SORTITEMS = (FIRST + 48),
            SUBITEMHITTEST = (FIRST + 57),
            UPDATE = (FIRST + 42)
        }

        public enum LVNI : int
        {
            ALL = 0x0,
            FOCUSED = 0x1,
            SELECTED = 0x2,
            CUT = 0x4,
            DROPHILITED = 0x8,
            ABOVE = 0x100,
            BELOW = 0x200,
            TOLEFT = 0x400,
            TORIGHT = 0x800
        }

        public enum LVN : int
        {
            FIRST = 0,
            BEGINDRAG = (FIRST - 9),
            BEGINLABELEDITA = (FIRST - 5),
            BEGINLABELEDITW = (FIRST - 75),
            BEGINRDRAG = (FIRST - 11),
            COLUMNCLICK = (FIRST - 8),
            DELETEALLITEMS = (FIRST - 4),
            DELETEITEM = (FIRST - 3),
            ENDLABELEDITA = (FIRST - 6),
            ENDLABELEDITW = (FIRST - 76),

            GETDISPINFOA = (FIRST - 50),
            GETDISPINFOW = (FIRST - 77),

            HOTTRACK = (FIRST - 21),
            INSERTITEM = (FIRST - 2),
            ITEMACTIVATE = (FIRST - 14),
            ITEMCHANGED = (FIRST - 1),
            ITEMCHANGING = (FIRST - 0),
            KEYDOWN = (FIRST - 55),
            MARQUEEBEGIN = (FIRST - 56),
            ODCACHEHINT = (FIRST - 13),
            ODFINDITEMA = (FIRST - 52),
            ODFINDITEMW = (FIRST - 79),
            ODSTATECHANGED = (FIRST - 15),
            SETDISPINFOA = (FIRST - 51),
            SETDISPINFOW = (FIRST - 78)
        }

        public enum LVSCW : int
        {
            AUTOSIZE = -1,
            AUTOSIZE_USEHEADER = -2
        }

        public enum LVSIL : int
        {
            NORMAL = 0,
            SMALL = 1,
            STATE = 2
        }

        public enum LVS : int
        {
            ALIGNLEFT = 0x800,
            ALIGNMASK = 0xC00,
            ALIGNTOP = 0x0,
            AUTOARRANGE = 0x100,
            EDITLABELS = 0x200,
            EX_CHECKBOXES = 0x4,
            EX_FLATSB = 0x100,
            EX_FULLROWSELECT = 0x20,
            EX_GRIDLINES = 0x1,
            EX_HEADERDRAGDROP = 0x10,
            EX_INFOTIP = 0x400,
            EX_ONECLICKACTIVATE = 0x40,
            EX_REGIONAL = 0x200,
            EX_SUBITEMIMAGES = 0x2,
            EX_TRACKSELECT = 0x8,
            EX_TWOCLICKACTIVATE = 0x80,
            ICON = 0x0,
            LIST = 0x3,
            NOCOLUMNHEADER = 0x4000,
            NOLABELWRAP = 0x80,
            NOSCROLL = 0x2000,
            NOSORTHEADER = 0x8000,
            OWNERDATA = 0x1000,

            OWNERDRAWFIXED = 0x400,
            REPORT = 0x1,
            SHAREIMAGELISTS = 0x40,

            SHOWSELALWAYS = 0x8,
            SINGLESEL = 0x4,
            SMALLICON = 0x2,

            SORTASCENDING = 0x10,

            SORTDESCENDING = 0x20,
            TYPEMASK = 0x3,
            TYPESTYLEMASK = 0xFC00,
        }
    }</description>
		<content:encoded><![CDATA[<p>GGGGGGGGGGGGGGGGRRRRRRRRRRRREEEEEEEEAAAAAAAAAAAAATTTTTTTTT<br />
Because you are so great i will give you my code where i wrapped dat shit up, plus adding background changing + trasparency dehavior. Keep up the good work!</p>
<p>public static class ListViewUtil<br />
    {<br />
        private const uint CLR_NONE = 0xFFFFFFFF;</p>
<p>        public static void SetBackgroundImage(ListView listView, Bitmap bitmap)<br />
        {<br />
            LVBKIMAGE lvBkImage = new LVBKIMAGE();<br />
            lvBkImage.ulFlags = LVBKIF.SOURCE_HBITMAP | LVBKIF.STYLE_TILE;<br />
            lvBkImage.hbm = bitmap.GetHbitmap();<br />
            lvBkImage.cchImageMax = 0;<br />
            lvBkImage.xOffsetPercent = 0;<br />
            lvBkImage.yOffsetPercent = 0;</p>
<p>            Message msg = Message.Create(listView.Handle, (int)LVM.SETBKIMAGEW, // LVM_SETBKIMAGE,<br />
            (IntPtr)0, Marshal.AllocCoTaskMem(Marshal.SizeOf(lvBkImage)));<br />
            Marshal.StructureToPtr(lvBkImage, msg.LParam, false);<br />
            MessageWindow.SendMessage(ref msg);<br />
            Marshal.FreeCoTaskMem(msg.LParam);<br />
        }</p>
<p>        public static void SetBackgroundTransparent(ListView listView)<br />
        {<br />
            HwndUtil.SendMessage(listView.Handle, (int)LVM.SETBKCOLOR, 0, CLR_NONE);<br />
        }</p>
<p>        public static void SetTextBackgroundTransparent(ListView listView)<br />
        {<br />
            HwndUtil.SendMessage(listView.Handle, (int)LVM.SETTEXTBKCOLOR, 0, CLR_NONE);<br />
        }</p>
<p>        public void SetAllowDraggableColumns(ListView lv, bool enabled)<br />
        {<br />
            Message msg = new Message();<br />
            msg.HWnd = lv.Handle;<br />
            msg.Msg = LVM.SETEXTENDEDLISTVIEWSTYLE;<br />
            msg.WParam = (IntPtr)LVS.NOSCROLL;<br />
            msg.LParam = enabled ? (IntPtr)LVS_NOSCROLL : IntPtr.Zero;</p>
<p>            MessageWindow.SendMessage(ref msg);<br />
        }</p>
<p>        public enum LVBKIF : int<br />
        {<br />
            SOURCE_NONE = 0,<br />
            SOURCE_HBITMAP = 1,<br />
            SOURCE_URL = 2,<br />
            SOURCE_MASK = 3,<br />
            STYLE_NORMAL = 0,<br />
            STYLE_TILE = 0&#215;10,<br />
            STYLE_MASK = 0&#215;10,<br />
            FLAG_TILEOFFSET = 0&#215;100<br />
        }</p>
<p>        public enum LVBKIF_SOURCE : int<br />
        {<br />
            NONE = 0&#215;0,<br />
            HBITMAP = 0&#215;1,<br />
            URL = 0&#215;2,<br />
            MASK = 0&#215;3<br />
        }</p>
<p>        public enum LVBKIF_STYLE : int<br />
        {<br />
            NORMAL = 0&#215;0,<br />
            TILE = 0&#215;10,<br />
            MASK = 0&#215;10<br />
        }</p>
<p>        public enum LVBKIF_FLAG : int<br />
        {<br />
            TILEOFFSET = 0&#215;100<br />
        }</p>
<p>        public class LVBKIMAGE<br />
        {<br />
            public LVBKIF ulFlags = LVBKIF.SOURCE_NONE;<br />
            public IntPtr hbm = IntPtr.Zero;<br />
            public IntPtr pszImage = IntPtr.Zero;<br />
            public uint cchImageMax = 0;<br />
            public int xOffsetPercent = 100;<br />
            public int yOffsetPercent = 100;<br />
        };</p>
<p>        public enum LVA : int<br />
        {<br />
            DEFAULT = 0,<br />
            ALIGNLEFT = 1,<br />
            ALIGNTOP = 2,<br />
            SNAPTOGRID = 5<br />
        }</p>
<p>        public enum LVCFMT : int<br />
        {<br />
            LEFT = 0&#215;0,<br />
            RIGHT = 0&#215;1,<br />
            CENTER = 0&#215;2,<br />
            JUSTIFYMASK = 0&#215;3,<br />
            IMAGE = 0&#215;800,<br />
            BITMAP_ON_RIGHT = 0&#215;1000,<br />
            COL_HAS_IMAGES = 0&#215;8000<br />
        }</p>
<p>        public enum LVCF : int<br />
        {<br />
            FMT = 0&#215;1,<br />
            WIDTH = 0&#215;2,<br />
            TEXT = 0&#215;4,<br />
            IMAGE = 0&#215;10,<br />
            ORDER = 0&#215;20,<br />
            SUBITEM = 0&#215;8,<br />
        }</p>
<p>        public enum LVFI : int<br />
        {<br />
            PARAM = 0&#215;1,<br />
            STRING = 0&#215;2,<br />
            PARTIAL = 0&#215;8,<br />
            WRAP = 0&#215;20,<br />
            NEARESTXY = 0&#215;40<br />
        }</p>
<p>        [Flags]<br />
        public enum LVHT : int<br />
        {<br />
            NOWHERE = 0&#215;1,<br />
            ONITEM = ONITEMICON | ONITEMLABEL | ONITEMSTATEICON,<br />
            ONITEMICON = 0&#215;2,<br />
            ONITEMLABEL = 0&#215;4,<br />
            ONITEMSTATEICON = 0&#215;8,<br />
            ABOVE = 0&#215;8,<br />
            BELOW = 0&#215;10,<br />
            TORIGHT = 0&#215;20,<br />
            TOLEFT = 0&#215;40<br />
        }</p>
<p>        public enum LFIF : int<br />
        {<br />
            DI_SETITEM = 0&#215;1000,<br />
            IMAGE = 0&#215;2,<br />
            INDENT = 0&#215;10,<br />
            NORECOMPUTE = 0&#215;800,<br />
            PARAM = 0&#215;4,<br />
            STATE = 0&#215;8,<br />
            TEXT = 0&#215;1<br />
        }</p>
<p>        public enum LVIR : int<br />
        {<br />
            BOUNDS = 0,<br />
            ICON = 1,<br />
            LABEL = 2,<br />
            SELECTBOUNDS = 3<br />
        }</p>
<p>        public enum LVIS : int<br />
        {<br />
            FOCUSED = 0&#215;1,<br />
            CUT = 0&#215;4,<br />
            SELECTED = 0&#215;2,<br />
            DROPHILITED = 0&#215;8,<br />
            OVERLAYMASK = 0xF00,<br />
            STATEIMAGEMASK = 0xF000<br />
        }</p>
<p>        public enum LVM : int<br />
        {<br />
            FIRST = 0&#215;1000,<br />
            APPROXIMATEVIEWRECT = (FIRST + 64),<br />
            ARRANGE = (FIRST + 22),</p>
<p>            CREATEDRAGIMAGE = (FIRST + 33),</p>
<p>            DELETEALLITEMS = (FIRST + 9),<br />
            DELETECOLUMN = (FIRST + 28),</p>
<p>            DELETEITEM = (FIRST + 8),<br />
            EDITLABELA = (FIRST + 23),</p>
<p>            EDITLABELW = (FIRST + 118),<br />
            ENSUREVISIBLE = (FIRST + 19),</p>
<p>            FINDITEMA = (FIRST + 13),<br />
            FINDITEMW = (FIRST + 83),</p>
<p>            GETBKCOLOR = (FIRST + 0),</p>
<p>            GETBKIMAGEA = (FIRST + 69),<br />
            GETBKIMAGEW = (FIRST + 139),<br />
            GETCALLBACKMASK = (FIRST + 10),<br />
            GETCOLUMNA = (FIRST + 25),<br />
            GETCOLUMNORDERARRAY = (FIRST + 59),</p>
<p>            GETCOLUMNW = (FIRST + 95),<br />
            GETCOLUMNWIDTH = (FIRST + 29),</p>
<p>            GETCOUNTPERPAGE = (FIRST + 40),<br />
            GETEDITCONTROL = (FIRST + 24),</p>
<p>            GETHEADER = (FIRST + 31),<br />
            GETHOTCURSOR = (FIRST + 63),</p>
<p>            GETHOTITEM = (FIRST + 61),<br />
            GETHOVERTIME = (FIRST + 72),</p>
<p>            GETIMAGELIST = (FIRST + 2),<br />
            GETISEARCHSTRINGA = (FIRST + 52),</p>
<p>            GETISEARCHSTRINGW = (FIRST + 117),<br />
            GETITEMCOUNT = (FIRST + 4),</p>
<p>            GETITEMPOSITION = (FIRST + 16),<br />
            GETITEMSPACING = (FIRST + 51),</p>
<p>            GETITEMSTATE = (FIRST + 44),<br />
            GETITEMTEXTA = (FIRST + 45),<br />
            GETITEMTEXTW = (FIRST + 115),<br />
            GETNEXTITEM = (FIRST + 12),<br />
            GETORIGIN = (FIRST + 41),<br />
            GETSELECTEDCOUNT = (FIRST + 50),</p>
<p>            GETSELECTIONMARK = (FIRST + 66),<br />
            GETSTRINGWIDTHA = (FIRST + 17),<br />
            GETSTRINGWIDTHW = (FIRST + 87),<br />
            GETSUBITEMRECT = (FIRST + 56),<br />
            GETTEXTBKCOLOR = (FIRST + 37),<br />
            GETTEXTCOLOR = (FIRST + 35),<br />
            GETTOPINDEX = (FIRST + 39),<br />
            GETVIEWRECT = (FIRST + 34),<br />
            GETWORKAREA = (FIRST + 70),<br />
            HITTEST = (FIRST + 18),<br />
            INSERTCOLUMNA = (FIRST + 27),</p>
<p>            INSERTCOLUMNW = (FIRST + 97),<br />
            INSERTITEMA = (FIRST + 7),<br />
            INSERTITEMW = (FIRST + 77),<br />
            REDRAWITEMS = (FIRST + 21),<br />
            SCROLL = (FIRST + 20),</p>
<p>            SETBKCOLOR = (FIRST + 1),<br />
            SETBKIMAGEA = (FIRST + 68),</p>
<p>            SETBKIMAGEW = (FIRST + 138),<br />
            SETCALLBACKMASK = (FIRST + 11),<br />
            SETCOLUMNA = (FIRST + 26),<br />
            SETCOLUMNORDERARRAY = (FIRST + 58),<br />
            SETCOLUMNW = (FIRST + 96),<br />
            SETCOLUMNWIDTH = (FIRST + 30),<br />
            SETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 54,<br />
            SETHOTCURSOR = (FIRST + 62),<br />
            SETHOTITEM = (FIRST + 60),<br />
            SETHOVERTIME = (FIRST + 71),<br />
            SETICONSPACING = (FIRST + 53),<br />
            SETIMAGELIST = (FIRST + 3),<br />
            SETITEMCOUNT = (FIRST + 47),</p>
<p>            SETITEMPOSITION = (FIRST + 15),<br />
            SETITEMPOSITION32 = (FIRST + 49),<br />
            SETITEMSTATE = (FIRST + 43),</p>
<p>            SETITEMTEXTA = (FIRST + 46),<br />
            SETITEMTEXTW = (FIRST + 116),<br />
            SETSELECTIONMARK = (FIRST + 67),<br />
            SETTEXTBKCOLOR = (FIRST + 38),</p>
<p>            SETTEXTCOLOR = (FIRST + 36),<br />
            SETWORKAREA = (FIRST + 65),<br />
            SORTITEMS = (FIRST + 48),<br />
            SUBITEMHITTEST = (FIRST + 57),<br />
            UPDATE = (FIRST + 42)<br />
        }</p>
<p>        public enum LVNI : int<br />
        {<br />
            ALL = 0&#215;0,<br />
            FOCUSED = 0&#215;1,<br />
            SELECTED = 0&#215;2,<br />
            CUT = 0&#215;4,<br />
            DROPHILITED = 0&#215;8,<br />
            ABOVE = 0&#215;100,<br />
            BELOW = 0&#215;200,<br />
            TOLEFT = 0&#215;400,<br />
            TORIGHT = 0&#215;800<br />
        }</p>
<p>        public enum LVN : int<br />
        {<br />
            FIRST = 0,<br />
            BEGINDRAG = (FIRST &#8211; 9),<br />
            BEGINLABELEDITA = (FIRST &#8211; 5),<br />
            BEGINLABELEDITW = (FIRST &#8211; 75),<br />
            BEGINRDRAG = (FIRST &#8211; 11),<br />
            COLUMNCLICK = (FIRST &#8211; 8),<br />
            DELETEALLITEMS = (FIRST &#8211; 4),<br />
            DELETEITEM = (FIRST &#8211; 3),<br />
            ENDLABELEDITA = (FIRST &#8211; 6),<br />
            ENDLABELEDITW = (FIRST &#8211; 76),</p>
<p>            GETDISPINFOA = (FIRST &#8211; 50),<br />
            GETDISPINFOW = (FIRST &#8211; 77),</p>
<p>            HOTTRACK = (FIRST &#8211; 21),<br />
            INSERTITEM = (FIRST &#8211; 2),<br />
            ITEMACTIVATE = (FIRST &#8211; 14),<br />
            ITEMCHANGED = (FIRST &#8211; 1),<br />
            ITEMCHANGING = (FIRST &#8211; 0),<br />
            KEYDOWN = (FIRST &#8211; 55),<br />
            MARQUEEBEGIN = (FIRST &#8211; 56),<br />
            ODCACHEHINT = (FIRST &#8211; 13),<br />
            ODFINDITEMA = (FIRST &#8211; 52),<br />
            ODFINDITEMW = (FIRST &#8211; 79),<br />
            ODSTATECHANGED = (FIRST &#8211; 15),<br />
            SETDISPINFOA = (FIRST &#8211; 51),<br />
            SETDISPINFOW = (FIRST &#8211; 78)<br />
        }</p>
<p>        public enum LVSCW : int<br />
        {<br />
            AUTOSIZE = -1,<br />
            AUTOSIZE_USEHEADER = -2<br />
        }</p>
<p>        public enum LVSIL : int<br />
        {<br />
            NORMAL = 0,<br />
            SMALL = 1,<br />
            STATE = 2<br />
        }</p>
<p>        public enum LVS : int<br />
        {<br />
            ALIGNLEFT = 0&#215;800,<br />
            ALIGNMASK = 0xC00,<br />
            ALIGNTOP = 0&#215;0,<br />
            AUTOARRANGE = 0&#215;100,<br />
            EDITLABELS = 0&#215;200,<br />
            EX_CHECKBOXES = 0&#215;4,<br />
            EX_FLATSB = 0&#215;100,<br />
            EX_FULLROWSELECT = 0&#215;20,<br />
            EX_GRIDLINES = 0&#215;1,<br />
            EX_HEADERDRAGDROP = 0&#215;10,<br />
            EX_INFOTIP = 0&#215;400,<br />
            EX_ONECLICKACTIVATE = 0&#215;40,<br />
            EX_REGIONAL = 0&#215;200,<br />
            EX_SUBITEMIMAGES = 0&#215;2,<br />
            EX_TRACKSELECT = 0&#215;8,<br />
            EX_TWOCLICKACTIVATE = 0&#215;80,<br />
            ICON = 0&#215;0,<br />
            LIST = 0&#215;3,<br />
            NOCOLUMNHEADER = 0&#215;4000,<br />
            NOLABELWRAP = 0&#215;80,<br />
            NOSCROLL = 0&#215;2000,<br />
            NOSORTHEADER = 0&#215;8000,<br />
            OWNERDATA = 0&#215;1000,</p>
<p>            OWNERDRAWFIXED = 0&#215;400,<br />
            REPORT = 0&#215;1,<br />
            SHAREIMAGELISTS = 0&#215;40,</p>
<p>            SHOWSELALWAYS = 0&#215;8,<br />
            SINGLESEL = 0&#215;4,<br />
            SMALLICON = 0&#215;2,</p>
<p>            SORTASCENDING = 0&#215;10,</p>
<p>            SORTDESCENDING = 0&#215;20,<br />
            TYPEMASK = 0&#215;3,<br />
            TYPESTYLEMASK = 0xFC00,<br />
        }<br />
    }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carl</title>
		<link>http://www.christec.co.nz/blog/archives/310/comment-page-1#comment-7066</link>
		<dc:creator>Carl</dc:creator>
		<pubDate>Wed, 14 May 2008 05:17:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.christec.co.nz/blog/archives/310#comment-7066</guid>
		<description>Subtly related to this is an MSDN article on how to sort ListView items by tapping the column header:

http://msdn.microsoft.com/en-us/library/ms229643.aspx

Being able to reorder and sort columns in a ListView will make for much more user friendly lists.</description>
		<content:encoded><![CDATA[<p>Subtly related to this is an MSDN article on how to sort ListView items by tapping the column header:</p>
<p><a href="http://msdn.microsoft.com/en-us/library/ms229643.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms229643.aspx</a></p>
<p>Being able to reorder and sort columns in a ListView will make for much more user friendly lists.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carl</title>
		<link>http://www.christec.co.nz/blog/archives/310/comment-page-1#comment-7065</link>
		<dc:creator>Carl</dc:creator>
		<pubDate>Wed, 14 May 2008 05:09:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.christec.co.nz/blog/archives/310#comment-7065</guid>
		<description>To get your ListViewExtender class working on .NET CF 2.0 (I&#039;m using VS2008), all I had to do was remove the &quot;this&quot; keyword from before the ListView parameter where present in the ListViewExtender methods.

One thing to note is that if a ListView has checkboxes enabled, the checkboxes are only drawn neatly when they&#039;re in the first column.  In other columns the far right side of the check box is covered by the item text.

Interesting is your design approach of using the extender class as a &quot;helper class&quot; as opposed to deriving the extender class directly from the ListView.  Your approach I think will prevent WIndows Forms Designer problems that I have come across when trying to use the Designer on a control that is derived from a control in the .NET base class library. In C# we have a new design decision to make: &quot;derivation&quot; vs. &quot;delegation&quot;, what do you think? 

Great article.</description>
		<content:encoded><![CDATA[<p>To get your ListViewExtender class working on .NET CF 2.0 (I&#8217;m using VS2008), all I had to do was remove the &#8220;this&#8221; keyword from before the ListView parameter where present in the ListViewExtender methods.</p>
<p>One thing to note is that if a ListView has checkboxes enabled, the checkboxes are only drawn neatly when they&#8217;re in the first column.  In other columns the far right side of the check box is covered by the item text.</p>
<p>Interesting is your design approach of using the extender class as a &#8220;helper class&#8221; as opposed to deriving the extender class directly from the ListView.  Your approach I think will prevent WIndows Forms Designer problems that I have come across when trying to use the Designer on a control that is derived from a control in the .NET base class library. In C# we have a new design decision to make: &#8220;derivation&#8221; vs. &#8220;delegation&#8221;, what do you think? </p>
<p>Great article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cocotteseb</title>
		<link>http://www.christec.co.nz/blog/archives/310/comment-page-1#comment-5199</link>
		<dc:creator>Cocotteseb</dc:creator>
		<pubDate>Mon, 24 Mar 2008 10:36:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.christec.co.nz/blog/archives/310#comment-5199</guid>
		<description>Hi,

I wanted to know for a long time how to do this. Thank you! :)

Concerning your question, I prefer having .NET CF 2.0 samples since I stay  with it for now. The best would be to have the two samples: CF 2.0 and 3.5 but this requires more work...</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I wanted to know for a long time how to do this. Thank you! :)</p>
<p>Concerning your question, I prefer having .NET CF 2.0 samples since I stay  with it for now. The best would be to have the two samples: CF 2.0 and 3.5 but this requires more work&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
