need Help in list control
Hi to all,
I am creating a list control dynamically in which i have to paas "accept files" style because i want drag and drop facilty. But i got there is no such style but when i create my list through dialog resource it shows "accept file" in extended style.
Please tell me how can i add this
Thanks in advance.
# 1 Re: need Help in list control
I don't understand what style do you mean though... to set the extended styles you should use CListCtrl::SetExtendedStyle method.
# 2 Re: need Help in list control
I don't understand what style do you mean though... to set the extended styles you should use CListCtrl::SetExtendedStyle method.
same as when i drag a list control from control bar and set it style property "accept files" through extended property check box.
Same i want to do dynamically, Now i want to know which style i write on function
CListCntrl::Create(LVS_ALLIGNTOP|LVS_AUTOARRANGE|LVS_REPORT,CRect(30,30,455,466),this,ID_LIST);
Thanks
# 3 Re: need Help in list control
Again: you must use CListCtrl::SetExtendedStyle method to set the extended styles.
You cannot set any extended style with CListCtrl::Create method.
# 4 Re: need Help in list control
Again: you must use CListCtrl::SetExtendedStyle method to set the extended styles.
You cannot set any extended style with CListCtrl::Create method.
well what should i pass in CListCtrl::SetExtendedStyle(style) as a parameter
to set style as "accept file" i m not getting suitable parameter
that is the problem
# 5 Re: need Help in list control
Hi,
Try calling CWnd::ModifyStyleEx.
The Style you've to set should be WS_EX_ACCEPTFILES.
All further details can be found easily on MSDN.
With regards
Programartist
(Ingo Bochmann)