Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CListView is evil?

CListView is evil?

Scheduled Pinned Locked Moved C / C++ / MFC
comalgorithmsdebuggingquestion
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Chris Losinger
    wrote on last edited by
    #1

    why would a CListCtrl move an item without my permission? i don't have any sorting set. it's an Icon view, Auto-arrange list view and it hates me. i do this:

    lvi.iItem = 0;
    int idx = GetListCtrl().InsertItem (&lvi);
    TRACE("idx = %d\n", idx);

    idx is, correctly, 0. but where does the item end up? position #3. -c


    To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses.
       /. #3848917

    Fractals!

    R L C 3 Replies Last reply
    0
    • C Chris Losinger

      why would a CListCtrl move an item without my permission? i don't have any sorting set. it's an Icon view, Auto-arrange list view and it hates me. i do this:

      lvi.iItem = 0;
      int idx = GetListCtrl().InsertItem (&lvi);
      TRACE("idx = %d\n", idx);

      idx is, correctly, 0. but where does the item end up? position #3. -c


      To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses.
         /. #3848917

      Fractals!

      R Offline
      R Offline
      Rage
      wrote on last edited by
      #2

      Chris Losinger wrote: i don't have any sorting set. it's an Icon view, Auto-arrange list view and it hates me. Well, i can´t think of something that you could have missed, and if the returned index is ok, i have definitely to agree with you : it hates you :) ~RaGE();

      1 Reply Last reply
      0
      • C Chris Losinger

        why would a CListCtrl move an item without my permission? i don't have any sorting set. it's an Icon view, Auto-arrange list view and it hates me. i do this:

        lvi.iItem = 0;
        int idx = GetListCtrl().InsertItem (&lvi);
        TRACE("idx = %d\n", idx);

        idx is, correctly, 0. but where does the item end up? position #3. -c


        To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses.
           /. #3848917

        Fractals!

        L Offline
        L Offline
        loket
        wrote on last edited by
        #3

        Doesn't the icons in icon view always end up at the next free space? Internaly it have index 0, it just looks like it is 3..?? /M


        - Don't sweat the petty things, and don't pet the sweaty things.

        C 1 Reply Last reply
        0
        • L loket

          Doesn't the icons in icon view always end up at the next free space? Internaly it have index 0, it just looks like it is 3..?? /M


          - Don't sweat the petty things, and don't pet the sweaty things.

          C Offline
          C Offline
          Chris Losinger
          wrote on last edited by
          #4

          yeah, that's what it seems like. looks like i'll have to take out all the items, and insert them back, in the order i want. what a nice feature... -c


          To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses.
             /. #3848917

          Fractals!

          1 Reply Last reply
          0
          • C Chris Losinger

            why would a CListCtrl move an item without my permission? i don't have any sorting set. it's an Icon view, Auto-arrange list view and it hates me. i do this:

            lvi.iItem = 0;
            int idx = GetListCtrl().InsertItem (&lvi);
            TRACE("idx = %d\n", idx);

            idx is, correctly, 0. but where does the item end up? position #3. -c


            To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses.
               /. #3848917

            Fractals!

            C Offline
            C Offline
            Chad Koehler
            wrote on last edited by
            #5

            take off the Auto-Arrange feature?

            C 1 Reply Last reply
            0
            • C Chad Koehler

              take off the Auto-Arrange feature?

              C Offline
              C Offline
              Chris Losinger
              wrote on last edited by
              #6

              nope. no effect. :(


              To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses.
                 /. #3848917

              Fractals!

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups