Selection in a CListCtrl - Programmer

This is a discussion on Selection in a CListCtrl - Programmer ; Hi NG, How can I select (and highlight) a particular row ! For example I have a clistctrl and I want to select the line 3! How do I do ? Thanks for any helps Salim...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Selection in a CListCtrl

  1. Selection in a CListCtrl

    Hi NG,

    How can I select (and highlight) a particular row !

    For example I have a clistctrl and I want to select the line 3! How do I do
    ?

    Thanks for any helps

    Salim



  2. Re: Selection in a CListCtrl


    "Salim GOMRI" schrieb im Newsbeitrag
    news:bg8dlr$mdl$1@news-reader1.wanadoo.fr...
    > Hi NG,
    >
    > How can I select (and highlight) a particular row !
    >
    > For example I have a clistctrl and I want to select the line 3! How do I

    do
    > ?
    >
    > Thanks for any helps
    >
    > Salim
    >


    Hi Salim,

    if you want that the complete row is selected (not only one field), set the
    Style "LVS_EX_FULLROWSELECT"
    e.g.
    ExStyle = myList.GetExtendedStyle();
    ExStyle |= LVS_EX_FULLROWSELECT;
    myList.SetExtendedStyle(ExStyle);

    if you want select a line from your code use the member function
    SetItemState()

    Regards
    Frank




+ Reply to Thread