I believe this depends on which version of .NET you're using. If I
understand you correctly, you're asking about owner-drawn controls,
which lets user specify how to draw an item in a list or tree view?
.NET 2003 only has owner-drawn list boxes. But I believe that .NET
2005 also supports owner-drawn tree views and list views (I haven't
upgraded yet, so I'm not sure).
This might be a good article to start with:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fsystemwindowsformslistboxclassdrawitemtopic.asp
> I believe this depends on which version of .NET you're using. If I
> understand you correctly, you're asking about owner-drawn controls,
[quoted text clipped - 7 lines]
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/
> html/frlrfsystemwindowsformslistboxclassdrawitemtopic.asp
No, it's not really owner-draw. In Win32, the Listctrl and Treectrl
send you a [LT]VN_GETDISPINFO message (via WM_NOTIFY) when they need
to display text (that is, when you set the text to LPSTR_TEXTCALLBACK
when the item is inserted). In the message, a structure is provided
where you copy the text. So the control is still doing _all_ of the
drawing - you are simply supplying the text on an as-needed basis.
When you have a large number of items, one of the things this does is
significantly cut down on memory usage since you are not inserting
a copy of the data you already have. (I normally use listctrls in
report mode)
Dave Connet