If xxview inherits the clistctrl class, you can directly call the clistctrl & m_listctrl = getctrl (); function to obtain the listctrl pointer in the View class, and insert data through the m_listctrl operation.
If it is a clistctrl control, you need to define its own control variables.
I think many of my friends have defined the lvcolumn struct for data insertion, because there are many features, but I think it is quite troublesome.
So I like to use the following method:
Int nindex = m_listctrl.insertcolumn (m_listctrl.getitemcount (), STR );
M_listctrl.setitemtext (nindex, 0, str1 );
M_listctrl.setitemtext (nindex, 1, str2 );
M_listctrl.setitemtext (nindex, 2, str3 );
... It is convenient, but there are restrictions on the data type to be inserted.
In addition, set clistctrlCodeTo set the report format, you must add the following in precreatewindow:
CS. Style | =Lvs_report| Lvs_singlesel;
CS. dwexstyle = lvs_ex_gridlines | lvs_ex_fullrowselect;