📄 subject_22843.htm
字号:
<p>
序号:22843 发表者:gameover 发表日期:2002-11-28 19:43:07
<br>主题:list控件问题
<br>内容:我用m_list1.addstream(i)添加字符串,如何清空list1窗口?如何取出中间一条字符串?
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:金枪鱼 回复日期:2002-11-28 20:12:37
<br>内容:是CListBox还是CList?<BR>好像都没有addstream成员函数!!!<BR><BR>如果是CListBox,清空<BR>使用m_list.ResetContent();<BR>如果是CLIst,清空<BR>使用m_list.RemoveAll();<BR><BR>对于CListBox,取出字符串<BR>使用GetText成员函数即可。<BR>对于CList那就要看你怎样设置的了。
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:我本大梦人 回复日期:2002-11-28 20:42:09
<br>内容:举个例子(其中m_pInfo为ListCtrl):<BR> m_pInfo.InsertColumn(0, "test1", LVCFMT_LEFT,140);<BR> m_pInfo.InsertColumn(1, "test2", LVCFMT_LEFT,250);<BR> m_pInfo.InsertColumn(2, "test3", LVCFMT_LEFT,250);<BR> <BR> ListView_SetExtendedListViewStyleEx(m_pInfo.m_hWnd,<BR> LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES|LVS_EX_INFOTIP,<BR> LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES|LVS_EX_INFOTIP);<BR><BR> m_pInfo.InsertItem(0, "0123456789");<BR><BR> m_pInfo.InsertItem(1,"9876543210");<BR><BR> m_pInfo.InsertItem(2, "ttttttttttt");<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>
回复者:金枪鱼 回复日期:2002-11-28 23:57:37
<br>内容:你说的整行选取带网格的报告视。<BR><BR><BR> //判断列表视中是否有行被选中<BR> if(m_pInfo.GetNextItem(-1,LVNI_SELECTED)==-1)<BR> {<BR> this->MessageBox("没有选中记录","提示",MB_OK|MB_ICONINFORMATION);<BR> }<BR> else<BR> {<BR> int nRowSelected=m_pInfo.GetNextItem(-1,LVNI_SELECTED);//获取被选中的行号<BR> CString strPersonNumber=m_pInfo.GetItemText(nRowSelected,0);//取出选中行的第一个字段内容<BR> }
<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 + -