如何改变CListCtrl中默认的行高度?
解决方案 »
- RichEdit问题
- 应聘某公司VC实习生,结果要我完成这些题
- 线程同步问题传入指针
- 为什么在对话框中输入两个数,结果不是异或的值呢?
- 安装vc/vs 6.0时自动重启问题
- 请教关于CAsyncSocket的问题!
- 关于直接打开资源中的位图 和 “双缓冲”的两个问题。【附出错代码】
- 会的不难,拿分容易:如何在菜单栏上添加小的按钮?
- 在钩子过程LRESULT WINAPI CallwndProc(int nCode,WPARAM,wParam,LPARAM lParam)当中,nCode是个什么东西
- Progress control问题,请高手指点
- 双击文件打开文档问题
- 怎样使我的列表视图是full row select的样式?。。。。。
CYouDlg::OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct)
{
// TODO: Add your message handler code here and/or call default
if(nIDCtl == IDC_YOU_LIST)
{
lpMeasureItemStruct->itemHeight = 20;
}
}
记得给分呀!
UINT CtlType;
UINT CtlID;
UINT itemID;
UINT itemWidth;
UINT itemHeight;
DWORD itemData
} MEASUREITEMSTRUCT;CtlTypeContains the control type. The values for control types are as follows: ODT_COMBOBOX Owner-draw combo box
ODT_LISTBOX Owner-draw list box
ODT_MENU Owner-draw menu
CtlIDContains the control ID for a combo box, list box, or button. This member is not used for a menu.itemIDContains the menu-item ID for a menu or the list-box-item ID for a variable-height combo box or list box. This member is not used for a fixed-height combo box or list box, or for a button.itemWidthSpecifies the width of a menu item. The owner of the owner-draw menu item must fill this member before it returns from the message.itemHeightSpecifies the height of an individual item in a list box or a menu. Before it returns from the message, the owner of the owner-draw combo box, list box, or menu item must fill out this member. The maximum height of a list box item is 255.