need help in CListCtrl
-
hi all..I'm making a program using CListCtrl that has a find feature(so if I enter a string in edit box and click the find button, it search the CListCtrl attributes with the same string, and then set the selection mark into the attributes). What function that I should use?(I already try SetSelectionMark,but it doesn't work) pls help... thx
-
hi all..I'm making a program using CListCtrl that has a find feature(so if I enter a string in edit box and click the find button, it search the CListCtrl attributes with the same string, and then set the selection mark into the attributes). What function that I should use?(I already try SetSelectionMark,but it doesn't work) pls help... thx
-
thx..but how to make the previous item is not selected(because when I try to use the find function twice or more, the previous selected item is still highlighted/selected) thx...
-
thx..but how to make the previous item is not selected(because when I try to use the find function twice or more, the previous selected item is still highlighted/selected) thx...
You need to call the same method to clear the selected state, just the flag you pass in changes. I don't see any other way of doing it on MSDN. Christian Graus - Microsoft MVP - C++
-
You need to call the same method to clear the selected state, just the flag you pass in changes. I don't see any other way of doing it on MSDN. Christian Graus - Microsoft MVP - C++
what flag that I should use, because I didn't find any suitable flag? Pls help thx..
-
what flag that I should use, because I didn't find any suitable flag? Pls help thx..
firebolt77 wrote: what flag that I should use, because I didn't find any suitable flag? Pls help Here is What MSDN State for your problem :- stateMask Value specifying which bits of the state member will be retrieved or modified. For example, setting this member to LVIS_SELECTED will cause only the item's selection state to be retrieved. This member allows you to modify one or more item states without having to retrieve all of the item states first. For example, setting this member to LVIS_SELECTED and state to zero will cause the item's selection state to be cleared, but none of the other states will be affected. To retrieve or modify all of the states, set this member to (UINT)-1. You can use the macro ListView_SetItemState both to set and to clear bits. -----------End MSDN Specific data----------------------------- I have marked statement your required with BOLD
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
-
firebolt77 wrote: what flag that I should use, because I didn't find any suitable flag? Pls help Here is What MSDN State for your problem :- stateMask Value specifying which bits of the state member will be retrieved or modified. For example, setting this member to LVIS_SELECTED will cause only the item's selection state to be retrieved. This member allows you to modify one or more item states without having to retrieve all of the item states first. For example, setting this member to LVIS_SELECTED and state to zero will cause the item's selection state to be cleared, but none of the other states will be affected. To retrieve or modify all of the states, set this member to (UINT)-1. You can use the macro ListView_SetItemState both to set and to clear bits. -----------End MSDN Specific data----------------------------- I have marked statement your required with BOLD
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
thx...it's work now...but why the view of ClistCtrl didn't scroll automatically to the attributes(for example the ClistCtrl only preview 10 attributes,but the attributes that I want is in index 20. When I try to run the find function, although the selection mark is in index 20,but the view still previewing 1-10). How to handle this problem? thx...
-
thx...it's work now...but why the view of ClistCtrl didn't scroll automatically to the attributes(for example the ClistCtrl only preview 10 attributes,but the attributes that I want is in index 20. When I try to run the find function, although the selection mark is in index 20,but the view still previewing 1-10). How to handle this problem? thx...
firebolt77 wrote: although the selection mark is in index 20,but the view still previewing 1-10). How to handle this problem? use CListCtrl::Scroll(...) or CListCtrl::SetSelectionMark(...) Function
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV