VC ClistBox 行高
来源:互联网 发布:unity3d 渐变透明 编辑:程序博客网 时间:2024/06/05 19:50
C/C++ code
CImageList imgList; //为ClistCtrl设置一个图像列表,以设置行高
imgList.Create(IDB_BITMAP4, 16, 1, RGB(255, 255, 255)); // IDB_BITMAP4 是 16*16的 所以行高16像素
CListCtrl &listCtrl=(CListCtrl&)GetListCtrl();
listCtrl.SetImageList(&imgList,LVSIL_SMALL);
目前我只用过这个办法,可能还有别的办法,估计比较麻烦
//自己方法总结
在 oninitial:
m_cListResult.SetItemHeight(0,30);
HBRUSH CATE1368ManuFocusDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
if((pWnd->GetDlgCtrlID()==IDC_LIST_RESULT))
{
//pDC->SetTextColor(RGB(255,0,0));
CFont font;
LOGFONT lf;
memset(&lf, 0, sizeof(LOGFONT)); // 清零
lf.lfHeight = 30; // 设置字体高度
//lf.lfWidth = 60;
//lf.lfWeight = 60;
strcpy(lf.lfFaceName, "Arial"); // 设置字形
font.CreateFontIndirect(&lf); // 生成字体
pDC->SelectObject(&font);
}
// TODO: Return a different brush if the default is not desired
return hbr;
}
- VC ClistBox 行高
- 点击CListBox选中行外取消选中高亮状态
- CListBox选取多行
- CListbox
- CListBox
- CListBox
- CListBox
- clistbox
- VC中让CListBox带有复选框
- VC中让CListBox带有复选框
- VC CListBox中加复选框
- (VC/MFC) CListBox类 和 Listbox控件
- VC MFC列表框(CListBox)控件
- 3.VC(ui)-clistbox 和button的自绘
- VC++------------为CListBox加上智能水平滚动条
- VC ++MFC列表框(CListBox)控件简单自绘
- 选中某一item,高亮显示(CListCtrl CTreeCtrl CListBox)
- CListBox取消高亮选中状态的功能:
- Gedit中文乱码解决。我使用了gconftool-2 那行
- 打印5阶幻方
- sar访谈
- java代码执行js
- px像素、em相对单位,到底是什么意思?
- VC ClistBox 行高
- poj 2828 Buy Tickets 线段树
- 解决FlexPaper分页分段加载问题
- 整理tomcat安全证书 https访问
- VIM 参考手册 For Vim version 7.3
- SCI期刊查询
- Command 模式C++ 代码
- 【集合】ArrayList数组列表类
- java静态方法注意的问题