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. To fix the first column of CListView grid type control in MFC

To fix the first column of CListView grid type control in MFC

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++css
5 Posts 3 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.
  • S Offline
    S Offline
    sma123
    wrote on last edited by
    #1

    Hi, I am using my own gridview derived from Clistview. My problem is to make the first column always fixed on Horizontal scroll. Can anybody knows the best solution for this in MFC.. Thank you in advance...

    D L 2 Replies Last reply
    0
    • S sma123

      Hi, I am using my own gridview derived from Clistview. My problem is to make the first column always fixed on Horizontal scroll. Can anybody knows the best solution for this in MFC.. Thank you in advance...

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

      sma123# wrote:

      ...first column always fixed on Horizontal scroll.

      What exactly do you mean by this?

      "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

      "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

      S 1 Reply Last reply
      0
      • S sma123

        Hi, I am using my own gridview derived from Clistview. My problem is to make the first column always fixed on Horizontal scroll. Can anybody knows the best solution for this in MFC.. Thank you in advance...

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        You need to look at the attributes of the columns in your control. You could possibly change the order or set the width to zero. However, you probably need to either subclass this control to manage this behaviour, or even create a new control from scratch.

        1 Reply Last reply
        0
        • D David Crow

          sma123# wrote:

          ...first column always fixed on Horizontal scroll.

          What exactly do you mean by this?

          "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

          "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

          S Offline
          S Offline
          sma123
          wrote on last edited by
          #4

          Hi David, I have a grid control derived from Cwnd. I am displaying the grid on ClistView. The problem is when I using horizontal scroll all columnc are shifting including first column. I need to fix the first column remaining can move with scroll. I am using MFC control which is older one. If you have any suggestion on this? Thanks in advance.

          D 1 Reply Last reply
          0
          • S sma123

            Hi David, I have a grid control derived from Cwnd. I am displaying the grid on ClistView. The problem is when I using horizontal scroll all columnc are shifting including first column. I need to fix the first column remaining can move with scroll. I am using MFC control which is older one. If you have any suggestion on this? Thanks in advance.

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

            Handle the HDN_BEGINTRACK message by returning TRUE. If you are using MFC, check out OnHeaderBeginTrack(). There are plenty of examples of both of these.

            "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

            "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

            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