I'm not clear about the masks and states.
thanks
Jeff
Since it is derived from TListBox, try SelSelIndex(9).
--
Bruce
Ray Sittig
"Jeff Kish" <kish...@charter.net> wrote in message
news:be6j44h6f0at06sqp...@4ax.com...
well, darn... that sounds way too easy...
I just didn't notice that for some odd reason, and ended up doing
this:
for (int nIndex = 0; nIndex < myTListView->GetItemCount(); nIndex++)
{
myTListView->GetItemText(nIndex, 0, buffer, 1024);
string strData = buffer;
if (strData == strTargetData)
{
myTListView->EnsureVisible(nIndex,false);
uint uState, uRetrievalState;
uRetrievalState = LVIS_SELECTED;
uState = myTListView->GetItemState(nIndex,uRetrievalState);
myTListView->SetItemState(nIndex,uRetrievalState,uRetrievalState);
break;
}
}
Your code looks so much more sensible... than the
myTListView->EnsureVisible(nIndex,false);
uint uState, uRetrievalState;
uRetrievalState = LVIS_SELECTED;
uState = myTListView->GetItemState(nIndex,uRetrievalState);
myTListView->SetItemState(nIndex,uRetrievalState,uRetrievalState);
thanks Bruce.
Jeff
sigh. I wish a little more common sense would leak into my brain at
opportune moments.. I decided when I coded this up that because I
never use the tlistview object, that it was a bit complex and went
along with that assumption instead of taking a step back and looking
at what is obviously... the more general and obvious approach.
Thanks again
Jeff