Results 1 to 6 of 6

Thread: add a listview in a form

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2001
    Posts
    163

    add a listview in a form

    just like in vb I want to add a listview in a form.How Can I do in vc++
    Purushottam

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    How much C++ do you know? How much WinAPI do you know? Have you heard about common controls? The list view is one of those. Once you know the basics of those three things (C++, WinAPI and common controls) it's relatively easy to add a list view control. But it's still not a simple drag&drop operation.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2001
    Posts
    163
    Thanks,U mean I have to use comm control.I thought that I have to use a class based on clistview.Any way thank u very much.
    Purushottam

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Nov 2001
    Posts
    163
    Are CListView and Listview same?Can we use CListView to add in dialog insted of listview(activex)?
    Purushottam

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Huh? CListView is the MFC wrapper for the list view common control. It's a C++ class.
    The Listview ActiveX is an ActiveX wrapper for the list view common control made for VB. Don't use it in C++, it's more work than it's worth.

    So you're using MFC? Do you know the API well? If yes, then go with CListView. If not then don't use MFC.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    No.
    CListView is an MFC control view class. This means the whole client area will be covered with the control. As opposed to CListCtrl, which is a simple control and has nothing to do with the MFC doc/view mechanism. Neither has anything to do with the ActiveX control Listview, which was created for VB and should be avoided in C++. CListCtrl and CListView both internally use the list view common control.

    If any of this didn't make sense to you then you shouldn't use MFC but rather pure API...
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

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