Results 1 to 3 of 3

Thread: How do I add items in the listview

  1. #1

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827

    How do I add items in the listview

    I want to add an item in listview in a spicifc column but I can't find any way to do that. I have two header columns:

    Macro MacroDescription

    Now I want to add "Macro1" under the header "Macro" and "MacroDesc" under the header "MacroDescription". How do I do that? Is there anyway to do this without handling to "WM_NOTIFY" from its parent window?

    Here is a little code but it is just adding the item under the first column:


    PHP Code:
    LVITEM lvi;
        
    lvi.mask LVIF_TEXT LVIF_STATE;
        
    lvi.pszText =  "MacroDesc"
                    
    lvi.iItem 0;
        
    lvi.state 0;
        
    lvi.stateMask 0;
        
    lvi.iSubItem 0;

        
    ListView_InsertItem(lvhwnd, &lvi); 
    What do I change in there so that I correctly put the string under the second column?

    Thanks
    Baaaaaaaaah

  2. #2

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    Come on guys Almost all the applications have this kind of listview with multicolumns.

    That is urgent because the school are starting the day after tomorrow and I won't have much time to work on my program
    Baaaaaaaaah

  3. #3

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    So, nobody has any answer?
    Baaaaaaaaah

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width