|
-
June 21st, 1999, 11:26 PM
#1
CListCtrl - Full row selection
How to select a full row in a CListCtrl?
Thanks in advance.
-
June 21st, 1999, 11:28 PM
#2
Re: CListCtrl - Full row selection
DWORD dwStyleEx = pListCtrl->GetExtendedStyle();
dwStyleEx |= LVS_EX_FULLROWSELECT;
pListCtrl->SetExtendedStyle(dwStyleEx);
-
June 22nd, 1999, 12:26 PM
#3
Re: CListCtrl - Full row selection
That works fine if you're using VC6, but GetExtendedStyle and SetExtendedStyle weren't supported in previous incarnations of VC. This will do the same thing (plus add header drag-drop and gridlines) for a list control. If you're using a list view, run this in your OnCreate override and drop the "m_list." prefix to SendMessage (tested with VC5).
// Assuming CListCtrl m_list;
int nStyleEx = LVS_EX_HEADERDRAGDROP | LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES;
m_list.SendMessage(LVM_SETEXTENDEDLISTVIEWSTYLE, nStyleEx, nStyleEx);
-
June 22nd, 1999, 12:39 PM
#4
Re: CListCtrl - Full row selection
is there an equivalent to these functions in vc++ 5.0
-
June 24th, 1999, 11:54 PM
#5
Re: CListCtrl - Full row selection
Hi,
Add this line it will work.
//m_List is your CListCtrl
m_List.SendMessage(LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT);
Regards,
Joel.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|