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. List View Insert Item

List View Insert Item

Scheduled Pinned Locked Moved C / C++ / MFC
7 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.
  • N Offline
    N Offline
    nitin3
    wrote on last edited by
    #1

    i have a ListView with Report style, an imageList is attached to it. I want to avoid image for a single item in the row. I tried to insert the item with out specifying LVIF_IMAGE flag, when i do so the item displays the first image in the image list.

    Thanks & Regards

    N K 2 Replies Last reply
    0
    • N nitin3

      i have a ListView with Report style, an imageList is attached to it. I want to avoid image for a single item in the row. I tried to insert the item with out specifying LVIF_IMAGE flag, when i do so the item displays the first image in the image list.

      Thanks & Regards

      N Offline
      N Offline
      Naveen
      wrote on last edited by
      #2

      nitin3 wrote:

      tried to insert the item with out specifying LVIF_IMAGE flag, when i do so the item displays the first image in the image list.

      Instead, specify the LVIF_IMAGE flag and set the value of iImage as -1;

      nave [OpenedFileFinder]

      N 1 Reply Last reply
      0
      • N nitin3

        i have a ListView with Report style, an imageList is attached to it. I want to avoid image for a single item in the row. I tried to insert the item with out specifying LVIF_IMAGE flag, when i do so the item displays the first image in the image list.

        Thanks & Regards

        K Offline
        K Offline
        KarstenK
        wrote on last edited by
        #3

        Use default image (a white image) :-O If images than all.

        Greetings from Germany

        _ 1 Reply Last reply
        0
        • N Naveen

          nitin3 wrote:

          tried to insert the item with out specifying LVIF_IMAGE flag, when i do so the item displays the first image in the image list.

          Instead, specify the LVIF_IMAGE flag and set the value of iImage as -1;

          nave [OpenedFileFinder]

          N Offline
          N Offline
          nitin3
          wrote on last edited by
          #4

          i allready tried by setting iImage as -1, it displays the same image at index 0. Is this a known issue or a problem in my code ?

          Thanks & Regards

          N 1 Reply Last reply
          0
          • N nitin3

            i allready tried by setting iImage as -1, it displays the same image at index 0. Is this a known issue or a problem in my code ?

            Thanks & Regards

            N Offline
            N Offline
            Naveen
            wrote on last edited by
            #5

            nitin3 wrote:

            i allready tried by setting iImage as -1, it displays the same image at index 0.

            I hope you have set the LVIF_IMAGE flag to also.

            nitin3 wrote:

            Is this a known issue or a problem in my code ?

            Possibly. Can you show the code?

            nave [OpenedFileFinder]

            1 Reply Last reply
            0
            • K KarstenK

              Use default image (a white image) :-O If images than all.

              Greetings from Germany

              _ Offline
              _ Offline
              _AnsHUMAN_
              wrote on last edited by
              #6

              IMO, iIt would be probably shown as a blank space then, just before the text.

              Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

              N 1 Reply Last reply
              0
              • _ _AnsHUMAN_

                IMO, iIt would be probably shown as a blank space then, just before the text.

                Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

                N Offline
                N Offline
                Naveen
                wrote on last edited by
                #7

                If we didn't set the image but set an image list, then also it will show a blank space.

                nave [OpenedFileFinder]

                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