Manula Thantriwatte
Manula Thantriwatte

Reputation: 308

Select full row using check box in MFC

I have list control including check box for each row. I want to select the entair row when selecting the check box. How can I do this ? What is the code sinnipt for that ?

Thanks.

Upvotes: 0

Views: 366

Answers (1)

dwo
dwo

Reputation: 3636

Inside the dialog (best in OnInitDialog) use following code:

DWORD dwStyle = m_list.GetExtendedStyle();
dwStyle |= LVS_EX_FULLROWSELECT;
m_list.SetExtendedStyle(dwStyle);

Upvotes: 5

Related Questions