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

📄 subject_35709.htm

📁 一些关于vc的问答
💻 HTM
字号:
<p>
序号:35709 发表者:gcling 发表日期:2003-04-08 22:26:39
<br>主题:如何获得ListBox的值,如何在Edit中显示?
<br>内容:想通过在ListBox中选择的字段,在Edit中显示,怎么实现?谢谢
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:风之影 回复日期:2003-04-08 22:52:16
<br>内容:masagebox()
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:wowow 回复日期:2003-04-09 09:12:21
<br>内容:如果你的ListBox为CListBox *pList,Edit为CEdit *pEdit:<BR>单选情况如下:<BR>int nSelect = pList-&gt;GetSel();<BR>CString sText;<BR>pList-&gt;GetText(nSelect, sText);<BR>pEdit-&gt;SetWindowText(sText);
<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>回复者:mimibaby 回复日期:2003-04-09 09:47:52
<br>内容:嘿,补充一下:<BR>如果你的ListBox为CListBox *pList,Edit为CEdit *pEdit:<BR>单选情况如下:<BR>CListBox *pList = (CList*)GetDlgItem(IDC_YOUR_LIST);<BR>//IDC_YOUR_LIST 是你的ListBox&nbsp;&nbsp;ID<BR>CEdit *pEditint = (CEdit*)GetDlgItem(IDC_YOUR_EDIT);<BR>//IDC_YOUR_EDIT 是你的Edit ID<BR>nSelect = pList-&gt;GetSel();<BR>CString sText;<BR>pList-&gt;GetText(nSelect, sText);<BR>pEdit-&gt;SetWindowText(sText); 
<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 + -