To fix the first column of CListView grid type control in MFC
-
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...
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
-
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...
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.
-
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
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.
-
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.
Handle the
HDN_BEGINTRACK
message by returningTRUE
. If you are using MFC, check outOnHeaderBeginTrack()
. 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