Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / March 2006

Tip: Looking for answers? Try searching our database.

Do .NET controls have equivalent of LPSTR_TEXTCALLBACK

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David Connet - 09 Mar 2006 17:27 GMT
Let's try this with a better subject since I didn't get any responses
before...

Do the .NET list controls (trees, etc) have the equivalent of
LPSTR_TEXTCALLBACK/I_IMAGECALLBACK/etc? I'm trying to port an existing
application that makes extensive use of LVN_GETDISPINFO and would prefer
not changing all that logic...

Thankx!
Dave Connet
Entelos, Inc.
Otis Mukinfus - 10 Mar 2006 17:38 GMT
>Let's try this with a better subject since I didn't get any responses
>before...
[quoted text clipped - 7 lines]
>Dave Connet
>Entelos, Inc.
It might be helpful if you would tell us what those things do, or are.

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
Roger - 10 Mar 2006 20:34 GMT
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

David Connet - 11 Mar 2006 05:33 GMT
> 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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.