Highlight first row of a CListCtrl? 
Author Message
 Highlight first row of a CListCtrl?

I have a dialog with, among other things, a single selection CListCtrl.
The problem is that when i tab my way through the different controls in
the dialog and finally move the focus to the CListCtrl, the first row in
it is not highlighted. This means the user will not clearly see that the
CListCtrl has focus (wich it has!). Nor does the focus dotted frame
appear. Not until I press the down arrow key, the first row gets

I tried the CListCtrl::SetItemState with LVIS_SELECTED and LVIS_FOCUS
but with absolutely no effect.

Any ideas?


Sat, 11 Dec 1999 03:00:00 GMT  
 Highlight first row of a CListCtrl?

>I tried the CListCtrl::SetItemState with LVIS_SELECTED and LVIS_FOCUS
>but with absolutely no effect.


What did you try with SetItemState? It should work like this I think:

        SetItemState( item, LVIS_SELECTED | LVIS_FOCUSED,
                LVIS_SELECTED | LVIS_FOCUSED );

Address is altered to discourage junk mail.
Remove ".---" for the real address.

Sun, 12 Dec 1999 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. CListCtrl not maintaining highlight after deleting previous row

2. CListCtrl and Row highlighting

3. CListCtrl - How to select / highlight a row in Listctrl view

4. Highlight a complete row in CListCtrl

5. Programatically Highlighting A Row In A CListCtrl

6. CListCtrl - Highlight a row

7. Help: Highlight the whole row of a CListCtrl

8. CListCtrl Row Highlight disappears when control loses focus

9. Select (or highlight) the whole row in the CListCtrl

10. CListCtrl and entire row highlighting.

11. Clistctrl: highlight a whole row

12. CListCtrl bug (empty first row)


Powered by phpBB® Forum Software