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 hanle header click & prevent of a list control

How to hanle header click & prevent of a list control

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialannouncement
4 Posts 2 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.
  • A Offline
    A Offline
    Amrit Agr
    wrote on last edited by
    #1

    Dear Developers, I am using a list control. We are developing a demo version of our product and I want to restrict header click because the items getting sorted. I have handle HDN_ITEMCLICK event and return at it's very first(if it's a demo version). I have also tried to set *pResult = 1, but both are not working. Can anyone help me to bring me out. Thanks. Amrit Agrawal

    D 1 Reply Last reply
    0
    • A Amrit Agr

      Dear Developers, I am using a list control. We are developing a demo version of our product and I want to restrict header click because the items getting sorted. I have handle HDN_ITEMCLICK event and return at it's very first(if it's a demo version). I have also tried to set *pResult = 1, but both are not working. Can anyone help me to bring me out. Thanks. Amrit Agrawal

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Amrit Agr wrote:

      ...I want to restrict header click because the items getting sorted.

      Can't you just add the LVS_NOSORTHEADER style?

      "One man's wage rise is another man's price increase." - Harold Wilson

      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

      "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

      A 1 Reply Last reply
      0
      • D David Crow

        Amrit Agr wrote:

        ...I want to restrict header click because the items getting sorted.

        Can't you just add the LVS_NOSORTHEADER style?

        "One man's wage rise is another man's price increase." - Harold Wilson

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

        A Offline
        A Offline
        Amrit Agr
        wrote on last edited by
        #3

        But when I have set extended styles of List control, I have not added LVS_NOSORTHEADER style. The code of set extended style is here. m_lvwTopics.SetExtendedStyle(LVS_EX_ONECLICKACTIVATE|LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES); Thanks.

        D 1 Reply Last reply
        0
        • A Amrit Agr

          But when I have set extended styles of List control, I have not added LVS_NOSORTHEADER style. The code of set extended style is here. m_lvwTopics.SetExtendedStyle(LVS_EX_ONECLICKACTIVATE|LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES); Thanks.

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          Use Spy++ to see what styles that control has.

          "One man's wage rise is another man's price increase." - Harold Wilson

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

          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