Announcement

Collapse
No announcement yet.

Listview Questions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Listview Questions

    I have been reading through some of the MDSN docs of the listview control and there are a couple of things I don't understand.

    1. What is a Virtual Listview (one with LVS_OWNERDATA set) and how is it different?
    2. Are the Macros mentioned usable in PB, The way they are mentioned it doesn't seem like C macros but possibly implimented in the API for the control.

    Macros like:
    Listview_SetExtendedListViewStyle
    Listview_SetExtendedListViewStyleEx
    Listview_GetExtendedListViewStyle

    The rest I think I understand from the examples listed at this forum, that you all that.

    Cheers



    ------------------
    Paul Dwyer
    Network Engineer
    Aussie in Tokyo

  • #2
    hmmm... not a very popular question

    ------------------
    Paul Dwyer
    Network Engineer
    Aussie in Tokyo

    Comment


    • #3
      Not my field of expertise, but perhaps I can be of some help.

      A virtual list view provides just the framework of what a regular list view
      gives you. Storing, retrieving and manipulating list items is up to you,
      which gives you a great deal more flexibility (and capacity) than the normal
      list view, at the cost of having to do much more of the work yourself.

      When MSDN says macros, it indeed means C macros. In PowerBASIC, these are
      implemented as Subs or Functions. Look for them in COMMCTRL.INC.

      ------------------
      Tom Hanlin
      PowerBASIC Staff

      Comment


      • #4
        Much easy to look MSDN and instead of subs/functions to use ordinary SendMessage.
        For example
        ListView_SetExtendedListViewStyle
        Sets extended styles for list view controls. You can use this macro or send the LVM_SETEXTENDEDLISTVIEWSTYLE message explicitly.
        Let's open LVM_SETEXTENDEDLISTVIEWSTYLE
        wParam = (WPARAM)dwExMask
        lParam = (LPARAM)dwExStyle
        And full description of styles. What's necessary else ?



        ------------------
        E-MAIL: [email protected]

        Comment


        • #5
          Paul,

          I have some sample source code (PBDLL5 SDK style) for implementing a
          virtual listview if you are interested. I use it primarily for
          displaying selected record fields from databases. It is a little
          slower than a LV control whose data is held in memory, but fast
          for most applications. It also has the benefit of not exhibiting
          the lengthy delay LV controls with thousands of items experience when
          destroyed.

          Email me for info
          Bruce Brown
          [email protected]


          ------------------

          Comment

          Working...
          X