CListCtrl在view中的使用
来源:互联网 发布:java开源社区有哪些 编辑:程序博客网 时间:2024/04/30 12:31
CListCtrl &m_ListCtrl=GetListCtrl();
long lStyle;
lStyle=GetWindowLong(m_ListCtrl.m_hWnd,GWL_STYLE);
lStyle&=~LVS_TYPEMASK;
lStyle|=LVS_REPORT;
SetWindowLong(m_ListCtrl.m_hWnd,GWL_STYLE,lStyle);
m_ListCtrl.SetExtendedStyle(LVS_EX_GRIDLINES|LVS_EX_FULLROWSELECT|LVS_EX_FLATSB | LVS_EX_CHECKBOXES);//带网格和复选框
int nListColCount=0;
nListColCount=m_ListCtrl.GetHeaderCtrl()->GetItemCount();
m_ListCtrl.DeleteAllItems();
for (int i=nListColCount-1;i>=0;i--)
{
m_ListCtrl.DeleteColumn(i);
}
m_ListCtrl.InsertColumn(0, _T("编号"), LVCFMT_LEFT, 60);
m_ListCtrl.InsertColumn(1, _T("文件名"), LVCFMT_LEFT, 100);
long lStyle;
lStyle=GetWindowLong(m_ListCtrl.m_hWnd,GWL_STYLE);
lStyle&=~LVS_TYPEMASK;
lStyle|=LVS_REPORT;
SetWindowLong(m_ListCtrl.m_hWnd,GWL_STYLE,lStyle);
m_ListCtrl.SetExtendedStyle(LVS_EX_GRIDLINES|LVS_EX_FULLROWSELECT|LVS_EX_FLATSB | LVS_EX_CHECKBOXES);//带网格和复选框
int nListColCount=0;
nListColCount=m_ListCtrl.GetHeaderCtrl()->GetItemCount();
m_ListCtrl.DeleteAllItems();
for (int i=nListColCount-1;i>=0;i--)
{
m_ListCtrl.DeleteColumn(i);
}
m_ListCtrl.InsertColumn(0, _T("编号"), LVCFMT_LEFT, 60);
m_ListCtrl.InsertColumn(1, _T("文件名"), LVCFMT_LEFT, 100);
m_ListCtrl.InsertColumn(2, _T("文件保存路径"), LVCFMT_LEFT, 1000);
////////////////////////////////////////////////////往其中插入数据///////////////////////////////////////////
strTmp=tempFind.GetFileName(); //保存文件名,包括后缀名
// 对找到文件的处理
convert_temp.Format("%d",nCount);
CListCtrl &m_listCtrl = GetListCtrl();
m_listCtrl.InsertItem(nCount,convert_temp);
m_listCtrl.SetItemText(nCount, 1, strTmp);
m_listCtrl.SetItemText(nCount, 2, str_temp_path);
///////////////////////////////////////////////////////////////////////结束/////////////////////////////////////////////
0 0
- CListCtrl在view中的使用
- CListCtrl在VC中的使用
- SurfaceView与View在游戏中的使用
- Camera 在自定义view中的使用
- 资源中的JPG在CListCtrl中显示
- CListCtrl使用
- CListCtrl使用
- CListCtrl 使用
- CListCtrl使用
- CListCtrl使用
- CListCtrl使用 .
- CListCtrl使用
- CListCtrl使用
- CListCtrl使用
- Android 自定义View及其在布局文件中的使用示例
- Android 自定义View及其在布局文件中的使用示例
- Android 自定义View及其在布局文件中的使用示例
- IOS中 xib自定义View在storyboard中的使用
- android知识总结
- Eclipse将引用了第三方jar包的Java项目打包成jar文件的两种方法
- Android 环境下编译FFmpeg
- repo 更新
- 软考之排序算法(二)——选择排序
- CListCtrl在view中的使用
- Unit9-problem-分数类
- Eclipse快捷键
- 微信公众账号你注册了吗?做营销怎么能错过微信营销。
- yii源码分析流程
- zoj 3229 Shoot the Bullet(有源汇上下界最大流)
- C++/C 宏列表
- Windows平台利用wininet做的HTTP的GET和POST,支持HTTPS
- 关于Cocoa的窗口创建调用-一个nib包含两个窗口