Add/modify Columns and Rows of a CListCtrl
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
I am trying to add/modify the columns and rows of ClistCtrl, when i compile the code there are no errors but when i run the program its giving some error message 'Illeagal Operation'.. My code is as follows: for(int c=0; c< nColumnCount; c++) m_lc.DeleteColumn(0); //here m_cols is the integer value entered by the user //and m_rows is also an integer value entered by the user //m_lc is the ListControl variable if(m_cols > 0) { LV_COLUMN lvcol; lvcol.mask = LVCF_FMT | LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM; lvcol.fmt = LVCFMT_LEFT; lvcol.cx = 80; CString s; for(int c=0; c