⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 subject_15618.htm

📁 一些关于vc的问答
💻 HTM
字号:
<p>
序号:15618 发表者:天天不睡觉 发表日期:2002-09-19 20:57:45
<br>主题:如何按列将数据写入控件CListCtrl
<br>内容:编一数据库程序,用listctrl控件,在空间窗口内分了5列,现在想将每列的数据按列的顺序<BR>写到对应的列下,不知道用什么函数??还有不太清楚每个item的下标是什么意思?希望高手们给与指点! 谢谢
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:秋叶禅 回复日期:2002-09-19 23:28:14
<br>内容:AddItem(行,列,数据);<BR>比如,一列中若干行的数据:<BR>………………<BR>…………<BR>int i =0;<BR>while(!recordset-&gt;GetEOF()<BR>{<BR>&nbsp;&nbsp;AddItem( i,0,数据);<BR>&nbsp;&nbsp;i++;<BR>&nbsp;&nbsp;recordset-&gt;MoveNext();<BR>}<BR><BR>…………<BR>…………<BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:凯凯 回复日期:2002-09-20 08:39:52
<br>内容:m_list.InsertItem(iCounter,strID);<BR>m_list.SetItemText(iCounter,1,strName);<BR>m_list.SetItemText(iCounter,2,strSex);<BR>m_list.SetItemText(iCounter,3,strDate);<BR><BR>先用InsertItem插入一行,并写入第一列。<BR>接下来用SetItemText写入后面的列。<BR>iCounter是行号。
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -