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

怎么设置一个combobox的下拉框的高度?

楼主day_dreamerabc(流浪牛)2006-05-03 19:42:59 在 C++ Builder / 基础类 提问

上次再这里看到了一个说是设定一个combobox的宽度的API,有谁知道设定它高度的函数是什么吗~~给小弟个提示~~谢啦`~  
  经验证正确后,马上给分 问题点数:20、回复次数:4Top

1 楼jjwwang((空园歌独酌,春日赋闲居))回复于 2006-05-03 20:57:13 得分 0

SendMessage(ComboBox1->Handle,   CB_SETDROPPEDWIDTH,   1000,   0   );Top

2 楼day_dreamerabc(流浪牛)回复于 2006-05-04 11:34:22 得分 0

这个不就是改变ComboBox下拉框宽度的API吗?难道是后面那两个参数在起作用,请指点下~Top

3 楼jjwwang((空园歌独酌,春日赋闲居))回复于 2006-05-04 11:56:55 得分 20

sorry,没看清楚.  
  SendMessage(ComboBox1->Handle,   CB_SETITEMHEIGHT,   0,   50   );  
  设置每一项的高度  
   
  下面是API说明.  
   
  An   application   sends   a   CB_SETITEMHEIGHT   message   to   set   the   height   of   list   items   or   the   selection   field   in   a   combo   box.    
   
  CB_SETITEMHEIGHT      
  wParam   =   (WPARAM)   index;                 //   item   index    
  lParam   =   (LPARAM)   (int)   height;   //   item   height    
     
   
  Parameters  
   
  index  
   
  Value   of   wParam.   Specifies   the   component   of   the   combo   box   for   which   to   set   the   height.    
  This   parameter   must   be   -1   to   set   the   height   of   the   selection   field.   It   must   be   zero   to   set   the   height   of   list   items,   unless   the   combo   box   has   the   CBS_OWNERDRAWVARIABLE   style.   In   that   case,   the   index   parameter   is   the   zero-based   index   of   a   specific   list   item.    
   
  height  
   
  Value   of   lParam.   Specifies   the   height,   in   pixels,   of   the   combo   box   component   identified   by   index.    
   
     
   
  Return   Values  
   
  If   the   index   or   height   is   invalid,   the   return   value   is   CB_ERR.    
   
  Remarks  
   
  The   selection   field   height   in   a   combo   box   is   set   independently   of   the   height   of   the   list   items.   An   application   must   ensure   that   the   height   of   the   selection   field   is   not   smaller   than   the   height   of   a   particular   list   item.Top

4 楼day_dreamerabc(流浪牛)回复于 2006-05-04 11:58:25 得分 0

谢谢风归叶Top

相关问题

关键词

得分解答快速导航

  • 帖主:day_dreamerabc
  • jjwwang

相关链接

  • CSDN Blog
  • 技术文档
  • 代码下载
  • 第二书店
  • 读书频道

广告也精彩

反馈

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