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