无法更改mfc虚拟列表控件头的大小 [英] not able to change size of mfc virtual list control header

查看:184
本文介绍了无法更改mfc虚拟列表控件头的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力保存列表控件的列宽,但在我的列表控件中我们用作虚拟列表控件,因此无法更新列宽。



我们可以使用任何其他选项来增加或减少虚拟列表控件的列宽。

解决方案

看看: VC ++ MFC教程:CListCtrl,InsertItem,使用列表控件,SetImageList,带源代码的文章 [ ^ ]



>我们可以拥有任何其他选项可以增加或减少虚拟列表控件的列宽。



是的,我们可以:



  //   poi nter到我的列表视图控件。 
extern CListCtrl * pmyListCtrl;

// 第一列的列宽加倍。
int nWidth = pmyListCtrl-> GetColumnWidth( 0 );
pmyListCtrl-> SetColumnWidth( 0 2 * nWidth);


i am working on on to save the column width of a list control,but in my list control we used as virtual list control so am not able to update the column width.

can we have any other option to increase or decrease the column width of virtual list control.

解决方案

Take a look: VC++ MFC Tutorial: CListCtrl, InsertItem, Using List Control, SetImageList, Article with source code[^]

>can we have any other option to increase or decrease the column width of virtual list control.

Yes, we can:

// The pointer to my list view control.
extern CListCtrl* pmyListCtrl;

// Double the column width of the first column.
int nWidth = pmyListCtrl->GetColumnWidth(0);
pmyListCtrl->SetColumnWidth(0, 2*nWidth);


这篇关于无法更改mfc虚拟列表控件头的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆