Thread: Creating list view

  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    2

    Question Creating list view

    I created a list view(i think) in win32. but i can't add colums and items to it
    Anyone that can help me?

    Edit: I have checked MSDN but still can't get it to work.
    Last edited by Hani; 04-23-2008 at 10:54 AM.

  2. #2
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158

  3. #3
    Registered User
    Join Date
    Dec 2007
    Posts
    214
    It might help to show some of your code.

  4. #4
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    I don't see how, he's saying he has no idea how to go about doing this, not that his existing code isn't working.

  5. #5
    Registered User
    Join Date
    Dec 2007
    Posts
    214
    He did say he created a list view (he thinks). It would be useful to see how he attempted that. If the creation is correct, adding columns wouldn't be hard.

  6. #6
    HelpingYouHelpUsHelpUsAll
    Join Date
    Dec 2007
    Location
    In your nightmares
    Posts
    223
    If you are using the Win32 Api, have a look at the LVCOLUMN structure, and the function ListView_InsertColumn() to insert columns. Also, for inserting items have a look at this thread:

    Subitems in ListView and
    long time no C; //seige
    You miss 100% of the people you don't C;
    Code:
    if (language != LANG_C && language != LANG_CPP)
        drown(language);

  7. #7
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    Quote Originally Posted by Hani View Post
    I created a list view(i think) in win32. but i can't add colums and items to it
    Anyone that can help me?

    Edit: I have checked MSDN but still can't get it to work.
    Post your code, is easier than guessing.

    Have you used the LVS_REPORT style to allow multiple coloums?
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  8. #8
    Registered User
    Join Date
    Apr 2008
    Posts
    2
    The list view i created was just a normal createwindow() with list view class and LVS_REPORT.
    When creating colums and items i needs to create structs and i dont know what the struct variables is or what i should write. I want to start at the beginning... so let say i dont know how to create a list view....

  9. #9
    Registered User
    Join Date
    Dec 2007
    Posts
    214

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Pleas take a look & give a critique
    By sh3rpa in forum C++ Programming
    Replies: 14
    Last Post: 10-19-2007, 10:01 PM
  2. instantiated from here: errors...
    By advocation in forum C++ Programming
    Replies: 5
    Last Post: 03-27-2005, 09:01 AM
  3. How can I traverse a huffman tree
    By carrja99 in forum C++ Programming
    Replies: 3
    Last Post: 04-28-2003, 05:46 PM
  4. Linked list with two class types within template.
    By SilasP in forum C++ Programming
    Replies: 3
    Last Post: 02-09-2002, 06:13 AM
  5. singly linked list
    By clarinetster in forum C Programming
    Replies: 2
    Last Post: 08-26-2001, 10:21 PM