hello
I'm attaching a pic of a ListView, but it looks like a TreeView.
It's a program from Microsoft called "MSN Messenger".

how could I make a ListView look like the one in the picture ?
thanks
Posted on 2003-03-06 23:25:02 by Jnrz
What makes you think that is a ListView? No listview I know of does that. That is most likely a TreeView. Use a window spy utility to find out.
Posted on 2003-03-06 23:35:04 by Gunner
I thought it was a TreeView too, then playing with a Window Spy Utility I found out that it is a ListView.
that is why I posted here.
maybe a Microsoft trick ? :s
Posted on 2003-03-06 23:51:10 by Jnrz
Yes, it's a system Listview that I know of, dunno how to make it look like that in ASM though, just VB...

After the first item you set every subitem and adding default small icons for each item in the list.

I don't remember if the list is set as smallicon, list/report view, or what sorry, but it has to be set to 1 of the defaults before you can manipulate it like that... :)
Posted on 2003-03-07 01:27:22 by Knight Chat X
hello Knight Chat X;
Could you send me an example ?
a VB example would be great.
Thank you

jnrz7 at hotmail dot com
Posted on 2003-03-07 23:26:58 by Jnrz
Are you building chat program?

It is somewhat complex to do it using the Listview, strings need parsed, such as for links, alot of formatting is involved for each item displayed, and an API function is used to place a background image in the list, easier doing it with a treeview.

It'd be diffiult to give example without developing a big project with just a listview.

Chat program development, security, is something I'm into, hehe, here's some information on some stuff for MSN, got some TreeView examples there, don't think there's listview examples of MSN stuff there though, who knows:

http://www.planet-source-code.com/vb/scripts/BrowseCategoryOrSearchResults.asp?lngWId=1&grpCategories=&txtMaxNumberOfEntriesPerPage=10&optSort=Alphabetical&chkThoroughSearch=&blnTopCode=False&blnNewestCode=False&blnAuthorSearch=False&lngAuthorId=&strAuthorName=&blnResetAllVariables=&blnEditCode=False&mblnIsSuperAdminAccessOn=False&intFirstRecordOnPage=1&intLastRecordOnPage=10&intMaxNumberOfEntriesPerPage=10&intLastRecordInRecordset=29&chkCodeTypeZip=&chkCodeDifficulty=&chkCodeTypeText=&chkCodeTypeArticle=&chkCode3rdPartyReview=&txtCriteria=MSN+list&cmdGoToPage=2&lngMaxNumberOfEntriesPerPage=10
Posted on 2003-03-08 00:07:01 by Knight Chat X
Hello Knight Chat X:

yes I am building a chat program.
I am attaching a picture of a listview.
I dont want the link and background thing.
My question is, if do you know how to do the little images on the left of each listview item ? how to move the image a bit to the right
Thanks
Posted on 2003-03-08 00:44:04 by Jnrz
I have no technical information but I have see a MFC application with less than 20 lines of code embed a treeview into a list view and retain the Detail view of the list view while showing the items on the left column in a treeview hierarchy. For more details, look at www.codeguru.com

From the two samples of it I saw, it looks pretty easy. The best example I saw, uses a Header, ListView, and a Treeview and does a bit of subclassing but ultimately it becomes one control.


Thanks,
Shawn
Posted on 2003-03-08 01:22:27 by _Shawn
Dunno if you know VB much or not, but here's 1 of my older Listview projects in VB6 for chat program development:
http://knight_chat_x0.tripod.com/listview.exe

Instructions:
Just download and extract it to a folder, then load it into VB.
Posted on 2003-03-08 01:33:52 by Knight Chat X
thanks for the vb code..
but it looks like a normal listview.
Posted on 2003-03-08 13:10:11 by Jnrz
It's probably an owner-drawn listview control. You'll have to draw the text yourself but you can easily customize the looks.

Thomas
Posted on 2003-03-08 13:31:07 by Thomas
Thought maybe the code would help answer the...

Question:
Do you know how to do the little images on the left of each listview item?

Answer:
In the code I sent are examples of how to place icon to left of each item.

And depending on how the list is setup, you can re-arrange items in a listview at any point in the list, don't remember exactly which options are used to accomplish that though, but the settings for the style have to be set just right for the data to be able to be placed anywhere.
Posted on 2003-03-08 17:08:09 by Knight Chat X