My application is developig in VC++ 2008. I have a List Box. Where I am Loading some Text data from a text file. After Loaded the listBox is as show in the attached figure :
I have used it as a SINGLE SELECTION List Box. Here I would like to change as MULTILINE SELECTION so as to delete the selected List BOX datas.
For the Single Line Delete operation I have written the following code.
This has worked. The single line deleted and the remaining datas listed on ListBx But Now the User requirment got modified. I have changed the property to MULTILINE SELCTION. But the coding is confused.... Can u help me plz...Code:CListBox m_parameterlist; unsigned int len = m_parameterlist.GetCurSel(); if(len==LB_ERR) { len = m_parameterlist.GetCount(); len = len-1; } int current = m_parameterlist.DeleteString(len); int newcnt = m_parameterlist.GetCount(); CString str; if(newcnt>0) { for(int i = 0;i < newcnt;i++) { m_parameterlist.GetText( i, str ); } } else _asm nop;




Reply With Quote
