CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
不看会后悔的Windows XP之经验谈 简单快捷DIY实用家庭影院
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  VC/MFC >  界面

求救,在线等待:关于CListBox的基本使用

楼主dot_net(难道莫非岂不是)2003-01-08 12:14:11 在 VC/MFC / 界面 提问

我现在没有帮助文档,请教关于CListBox的基本使用:  
  1   设置风格:不支持选择多行  
  2   得到指定列的字符串 问题点数:50、回复次数:6Top

1 楼arvid_gs(west)回复于 2003-01-08 12:25:52 得分 10

1.CListBox.ModiFyStyle(   0,LBS_MULTIPLESEL)  
  2.CListBox.   GetItemData(index)Top

2 楼mensong(吉他乐手)回复于 2003-01-08 12:26:06 得分 10

1:默认的风格就仅支持单行,即在控件的属性里有Selection里,选择“Single”  
   
  2:建立一个相关联的CListBox变量,然后使用其成员函数:  
  void   GetText(   int   nIndex,   CString&   rString   )   const;  
   
  Return   Value  
   
  The   length   (in   bytes)   of   the   string,   excluding   the   terminating   null   character.   If   nIndex   does   not   specify   a   valid   index,   the   return   value   is   LB_ERR.  
   
  Parameters  
   
  nIndex  
   
  Specifies   the   zero-based   index   of   the   string   to   be   retrieved.  
   
  lpszBuffer  
   
  Points   to   the   buffer   that   receives   the   string.   The   buffer   must   have   sufficient   space   for   the   string   and   a   terminating   null   character.   The   size   of   the   string   can   be   determined   ahead   of   time   by   calling   the   GetTextLen   member   function.  
   
  rString  
   
  A   reference   to   a   CString   object.  
   
   
   
  以及:  
   
  int   GetCurSel(   )   const;  
   
  Return   Value  
   
  The   zero-based   index   of   the   currently   selected   item.   It   is   LB_ERR   if   no   item   is   currently   selected   or   if   the   list   box   is   a   multiple-selection   list   box.  
   
  Top

3 楼lihao_ningxia(耗子)回复于 2003-01-08 12:27:11 得分 5

up,还是多看看MSDN的帮忙吧Top

4 楼kinghawk(惊鸿)回复于 2003-01-08 12:28:36 得分 5

在MSND中索引CListBox。Top

5 楼qing_li73(Vincent Lee)回复于 2003-01-08 12:29:21 得分 10

See   the   tutorial   below,   FYI:    
   
  http://codeproject.com/combobox/listbox_tut.aspTop

6 楼sinhighly(非典型程序员)回复于 2003-01-08 12:49:56 得分 10

MSDN  
  upTop

7 楼dot_net(难道莫非岂不是)回复于 2003-01-08 14:55:36 得分 0

谢谢各位。btw:我现在没有msdnTop

相关问题

  • 使用jbuilder的困惑,在线等待
  • sqlloader的使用,在线等待!!!!!
  • wcschr如何使用?在线等待。。。。
  • rand如何使用?(在线等待)
  • treeview的使用方法?在线等待!
  • 如何使用DLL(在线等待)
  • 如何使用TLIB.EXE,在线等待~~~~
  • 求救:Access的使用(在线等待)
  • EVC4中使用RTTI(在线等待)?
  • 在线等待,IE使用使用中出现的问题

关键词

  • clistbox

得分解答快速导航

  • 帖主:dot_net
  • arvid_gs
  • mensong
  • lihao_ningxia
  • kinghawk
  • qing_li73
  • sinhighly

相关链接

  • Visual C++类图书
  • Visual C++类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo