Programming Tips - MFC: A row is only selected when I click on the label (left item)

Date: 2009oct6 OS: Windows Framework: MFC Language: C/C++ Q. MFC: A row is only selected when I click on the label (left item) in my report mode list control (CListCtrl). Is there a way to fix this? A. There are a number of ways to do this but the best is to enable LVS_EX_FULLROWSELECT like this:
void EnableNativeFullRowSelect(CListCtrl &list) { list.SetExtendedStyle(list.GetExtendedStyle() | LVS_EX_FULLROWSELECT); } // Example use BOOL CMyDlg::OnInitDialog() { CDialog::OnInitDialog(); EnableNativeFullRowSelect(m_MyList); // ... return TRUE; }