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. How to insert a triangle (delta) in header of list contrl ?

How to insert a triangle (delta) in header of list contrl ?

Scheduled Pinned Locked Moved C / C++ / MFC
databasetutorialquestion
8 Posts 5 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.
  • P Offline
    P Offline
    pc_dev
    wrote on last edited by
    #1

    I am using list control (report view) in windows List control headers contain a triangle shape which moves its direction when we click on the respective header showing sort order how can this delta be inserted in header? An other query please Is it possible to have multiple lines in an item or subitem of list control? I would be extremly thankful for providing the solutions to above problems.

    M R M 3 Replies Last reply
    0
    • P pc_dev

      I am using list control (report view) in windows List control headers contain a triangle shape which moves its direction when we click on the respective header showing sort order how can this delta be inserted in header? An other query please Is it possible to have multiple lines in an item or subitem of list control? I would be extremly thankful for providing the solutions to above problems.

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      pc_dev wrote:

      in windows List control headers contain a triangle shape which moves its direction when we click on the respective header showing sort order how can this delta be inserted in header?

      It's not built-in to the control but you can owner-draw the header and add one yourself. Mark

      L 2 Replies Last reply
      0
      • M Mark Salsbery

        pc_dev wrote:

        in windows List control headers contain a triangle shape which moves its direction when we click on the respective header showing sort order how can this delta be inserted in header?

        It's not built-in to the control but you can owner-draw the header and add one yourself. Mark

        L Offline
        L Offline
        led mike
        wrote on last edited by
        #3

        Not sure but I did this in the past and maybe did it with an image rather than owner draw.

        led mike

        M 1 Reply Last reply
        0
        • L led mike

          Not sure but I did this in the past and maybe did it with an image rather than owner draw.

          led mike

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          You can put images in column headers? I'm going to look into that. I need something similar :) Thanks man, Mark

          1 Reply Last reply
          0
          • P pc_dev

            I am using list control (report view) in windows List control headers contain a triangle shape which moves its direction when we click on the respective header showing sort order how can this delta be inserted in header? An other query please Is it possible to have multiple lines in an item or subitem of list control? I would be extremly thankful for providing the solutions to above problems.

            R Offline
            R Offline
            Ravi Bhavnani
            wrote on last edited by
            #5

            pc_dev wrote:

            how can this delta be inserted in header?

            See this[^] article.

            pc_dev wrote:

            Is it possible to have multiple lines in an item or subitem of list control?

            See this[^] article. /ravi

            This is your brain on Celcius Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com

            1 Reply Last reply
            0
            • M Mark Salsbery

              pc_dev wrote:

              in windows List control headers contain a triangle shape which moves its direction when we click on the respective header showing sort order how can this delta be inserted in header?

              It's not built-in to the control but you can owner-draw the header and add one yourself. Mark

              L Offline
              L Offline
              led mike
              wrote on last edited by
              #6

              Yes found the old project. Used a ImageList and then:

              HDITEM hItem;
              ZeroMemory( &hItem, sizeof(hItem));
              hItem.mask = HDI_IMAGE | HDI_FORMAT;
              _pList->GetHeaderCtrl()->GetItem( nCol, &hItem);
              hItem.iImage = nImg;
              hItem.fmt = HDF_LEFT | HDF_IMAGE | HDF_STRING | HDF_BITMAP_ON_RIGHT;

              led mike

              M 1 Reply Last reply
              0
              • L led mike

                Yes found the old project. Used a ImageList and then:

                HDITEM hItem;
                ZeroMemory( &hItem, sizeof(hItem));
                hItem.mask = HDI_IMAGE | HDI_FORMAT;
                _pList->GetHeaderCtrl()->GetItem( nCol, &hItem);
                hItem.iImage = nImg;
                hItem.fmt = HDF_LEFT | HDF_IMAGE | HDF_STRING | HDF_BITMAP_ON_RIGHT;

                led mike

                M Offline
                M Offline
                Mark Salsbery
                wrote on last edited by
                #7

                Cool! Thank you! It's as easy as tab controls :)

                1 Reply Last reply
                0
                • P pc_dev

                  I am using list control (report view) in windows List control headers contain a triangle shape which moves its direction when we click on the respective header showing sort order how can this delta be inserted in header? An other query please Is it possible to have multiple lines in an item or subitem of list control? I would be extremly thankful for providing the solutions to above problems.

                  M Offline
                  M Offline
                  Michael Dunn
                  wrote on last edited by
                  #8

                  This feature is built-in to commctrl v6, see here for sample code: clickety[^]

                  --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ");

                  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