Announcement

Collapse
No announcement yet.

ListView with ImageList - SDK Source Code

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

  • ListView with ImageList - SDK Source Code

    i posted some code at:
    http://www.powerbasic.com/support/pb...ad.php?t=23003

    please give me some feedback on it, i'm interested in the quality
    of my example.

    thanks

    ------------------
    -greg
    -Greg
    [email protected]
    MCP,MCSA,MCSE,MCSD

  • #2
    Hi Gregory,

    I like your posting. I had to locate tray.pbr correctly in my
    directories before it would run.

    There is a lot in the ListView to come to grips with. I have had
    to go to quite a few C and C++ sites to work with many of the examples
    provided there and slowly convert the code to PB.

    Keep at it.

    Regards,

    David

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

    Comment


    • #3
      Hi Gregory,
      This is a nice no-nonsense example. Nice work! I do have
      one question though. Shouldn't one use ImageList_Destroy to
      free up the memory for the image list when you no longer need it?
      Maybe I am misinformed about image lists but I always understood
      they are not automatically destroyed. Other then that question,
      it works great!

      Regards,
      Adam

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

      Comment


      • #4
        Listview destroys the attached imagelist.
        It depends on the style.
        Be carefull with system imagelists!


        ------------------
        hellobasic

        Comment


        • #5
          Adam,

          Thanks for your good comments. This example just uses Dlgproc
          and winmain. I find that with examples if you throw in tons
          of custom functions it gets confusing.

          Thats a good point about the ImageList_Destroy.
          I'll have to do more research on that.



          ------------------
          -Greg
          -Greg
          [email protected]
          MCP,MCSA,MCSE,MCSD

          Comment


          • #6
            Thanks Edwin for pointing that out. I went back and checked
            the List view window styles in the help guide and it does point
            out if you use the LVS_SHAREIMAGELISTS style then the control
            doesn't take control of the image list and therefore doesn't
            destroy it. Learn something new every day I say.
            Well at least I know now.

            Regards,
            Adam

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

            Comment


            • #7
              Greg, it looks great. I was a little concerned about your arrangement
              of SDK winmain() and winproc() code. If I get a little more time down the
              road, I will add this to the ListView code example of Peter Redi along
              side of a TreeView Control, to get a similar GUI as with the Windows Explorer.

              Regards,
              Jules
              Best regards
              Jules
              www.rpmarchildon.com

              Comment


              • #8
                Jules,

                Thanks for your nice comments. You mention that you were
                concerned about my arrangement with the Winmain and winProc
                functions, can you elaborate more on that?

                Thanks

                ------------------
                -Greg
                -Greg
                [email protected]
                MCP,MCSA,MCSE,MCSD

                Comment


                • #9
                  Hi Greg,

                  Can you please post some examples of how to put the ListView into Report view and deal with multiple columns (Subitems).

                  As a full time VB programmer, I use the ListView control extensively. I want to be able to do the same things in PB.

                  Thanks.

                  ------------------
                  ATB

                  Charles Kincaid

                  Comment

                  Working...
                  X