Angie
May 3rd, 1999, 04:07 PM
I would like to know how to highlight a row in a CListCtrl in a dialogbox. I basically created a dialog box, dropped a clistctrl in the dialog box and I am having trouble selecting the whole row. If anyone has any suggestions, I would appreciate them. Thanks, Angie.
Try adding the following code in your dialog's OnInitDialog function:
WORD dwStyle = ListView_GetExtendedListViewStyle(m_ListCtrl->m_hWnd );
dwStyle |= LVS_EX_GRIDLINES | LVS_EX_FULLROWSELECT;
ListView_SetExtendedListViewStyle( m_ListCtrl->m_hWnd, dwStyle );
m_ListCtrl is a user-defined member variable for your dialog's list control. This code turns on full row selection for your dialog.