c语言sscanf函数的用法是什么
274
2022-09-01
ListCtrl的用法
LONG lStyle = m_cListCtrl.SendMessage(LVM_GETEXTENDEDLISTVIEWSTYLE);lStyle |= LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVS_EX_HEADERDRAGDROP;m_cListCtrl.SendMessage(LVM_SETEXTENDEDLISTVIEWSTYLE, 0, (LPARAM)lStyle);
// TODO: 在此添加额外的初始化代码CRect rect;m_cListCtrl.GetClientRect(&rect);int nColInterval = rect.Width()/3;
m_cListCtrl.InsertColumn(0, _T("日期"), LVCFMT_CENTER, nColInterval);m_cListCtrl.InsertColumn(1, _T("指数"), LVCFMT_CENTER, nColInterval);m_cListCtrl.InsertColumn(2, _T("基数点"), LVCFMT_CENTER, nColInterval);
// Use the LV_ITEM structure to insert the items
LVITEM lvi;CString strItem;
// Insert the first item
lvi.mask = LVIF_IMAGE | LVIF_TEXT;strItem = "1990.12.19";lvi.iItem = 0;lvi.iSubItem = 0;lvi.pszText = (LPTSTR)(LPCTSTR)(strItem);//lvi.iImage = i%8; // There are 8 images in the image list
m_cListCtrl.InsertItem(&lvi);// Set subitem 1
strItem.Format(_T("%.2f"), 95.79);lvi.iSubItem =1;lvi.pszText = (LPTSTR)(LPCTSTR)(strItem);m_cListCtrl.SetItem(&lvi);// Set subitem 2
strItem.Format(_T("%d"),2);lvi.iSubItem =2;lvi.pszText = (LPTSTR)(LPCTSTR)(strItem);m_cListCtrl.SetItem(&lvi);
//第二个数据lvi.mask = LVIF_IMAGE | LVIF_TEXT;strItem = "1993.2.16";lvi.iItem = 1;lvi.iSubItem = 0;lvi.pszText = (LPTSTR)(LPCTSTR)(strItem);//lvi.iImage = i%8; // There are 8 images in the image list
m_cListCtrl.InsertItem(&lvi);// Set subitem 1
strItem.Format(_T("%.2f"), 1558.98);lvi.iSubItem =1;lvi.pszText = (LPTSTR)(LPCTSTR)(strItem);m_cListCtrl.SetItem(&lvi);// Set subitem 2
strItem.Format(_T("%d"),550);lvi.iSubItem =2;lvi.pszText = (LPTSTR)(LPCTSTR)(strItem);m_cListCtrl.SetItem(&lvi);
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~