DrPepUr Posted April 10, 2008 Posted April 10, 2008 I am messing around with a list view, I have 2 example sources, but I can not figure out what I am doing wrong.I am having trouble adding items to the list, I can get the items in the first Col but not in col1 or col2here is the basic code I am using, I got it out of one of the example projects .LOCAL lvi: LV_ITEMmov lvi.imask, LVIF_TEXT or LVIF_IMAGE or LVIF_PARAMpush 0pop lvi.iItempush 0pop lvi.lParammov lvi.iSubItem,00mov eax, offset Item1mov lvi.pszText, eaxINVOKE SendMessage, hList, LVM_INSERTITEM, 0, addr lviinc lvi.iSubItemmov eax,offset SubItem1mov lvi.pszText, eaxinvoke SendMessage,hList,LVM_SETITEM,0,addr lviLike I said above It adds the Item but not the SubItemAny Ideas?Thanks in advance,Dustyh1981
Killboy Posted April 10, 2008 Posted April 10, 2008 Dunno if that helps but maybe remove the [LVIF_IMAGE or LVIF_PARAM] masks... Doesnt make sense to me when you set them to 0 anyway. Arent subitems just columns ? You have to call LVM_INSERTCOLUMN before I guess... The code you posted looks fine at least from what MSDN says, never dealt with that stuff myself
GamingMasteR Posted April 10, 2008 Posted April 10, 2008 (edited) As killboy said you must had added the columns b4 u can add a subitem.Also try zero the whole structure b4 filling it's members.Anyway i'm making a sample right now . Edited April 10, 2008 by GamingMasteR
DrPepUr Posted April 10, 2008 Author Posted April 10, 2008 Thanks guys, I dunno about half this stuff , I have only used a listview in vb & vb.net aand had problems with those aswell. I will try your examlple. Thanks for the help.Dustyh1981
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now