首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

组合框高度有关问题

2012-05-23 
组合框高度问题在工具栏上创建了组合框。怎么也调不了下拉列表的高度。请高手们帮忙!index 0while (m_wnd

组合框高度问题
在工具栏上创建了组合框。
怎么也调不了下拉列表的高度。
请高手们帮忙!

  index = 0;
  while (m_wndToolBar2.GetItemID(index) != ID_BAR2_COMBO) index++;
  m_wndToolBar2.SetButtonInfo(index, ID_BAR2_COMBO, TBBS_SEPARATOR, nBarWidth * 3);
  m_wndToolBar2.GetItemRect(index, &rect);
  rect.top += 1; 
  rect.bottom += 1000;// 改变这个值不管用!
  if (!m_wndToolBar2.m_Combo.Create(WS_VISIBLE|CBS_DROPDOWN|WS_CHILD|/*WS_BORDER|*/WS_TABSTOP|CBS_AUTOHSCROLL,
rect, &m_wndToolBar2, ID_BAR2_COMBO))
  return FALSE;


[解决办法]
if (!m_wndToolBar2.m_Combo.Create(WS_VISIBLE|CBS_DROPDOWN|WS_CHILD|/*WS_BORDER|*/WS_TABSTOP|CBS_AUTOHSCROLL,
rect, &m_wndToolBar2, ID_BAR2_COMBO))
//
if (!m_Combo.Create(WS_VISIBLE|CBS_DROPDOWN|WS_CHILD|/*WS_BORDER|*/WS_TABSTOP|CBS_AUTOVSCROLL,
rect, &m_wndToolBar2, ID_BAR2_COMBO))
要单另一个m_Combo

热点排行