XML: <dlg pos="5,110,-5,260"class="panel" width="full" height="full">
<realwnd id="2001" pos="1,1,-1,-1" ctrlid="2001"crbg1="FBFCFD" />
</dlg>
定义CListViewCtrlEx m_wndCertListView;
对话框初始化中:
m_wndCertListView.Create(
GetViewHWND(),NULL,NULL,
WS_CHILD |LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SINGLESEL ,
0, 2001,NULL);
{
INT nRow =0;
m_wndCertListView.InsertColumn(nRow++,BkString::Get(106), LVCFMT_CENTER, 56);
m_wndCertListView.InsertColumn(nRow++,BkString::Get(107), LVCFMT_CENTER, 100);
m_wndCertListView.InsertColumn(nRow++,BkString::Get(108), LVCFMT_CENTER, 120);
m_wndCertListView.InsertColumn(nRow++,BkString::Get(109), LVCFMT_CENTER, 100);
m_wndCertListView.InsertColumn(nRow++,BkString::Get(110), LVCFMT_CENTER, 200);
}
m_wndCertListView.SetObserverWindow(m_hWnd);
在需要插入的地方:
int nItem=m_wndCertListView.Append(_T(""), NULL, 0,LISTITEM_CHECKBOX);
m_wndCertListView.AppendSubItem(nItem, strvertType);
m_wndCertListView.AppendSubItem(nItem, strvale);
m_wndCertListView.AppendSubItem(nItem, strsub);
m_wndCertListView.AppendSubItem(nItem, _T("A"));