b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

cimagelist_m_himagelist为空_cimagelist 蒙板(3)

电脑杂谈  发布时间:2017-03-08 00:02:55  来源:网络整理

pILSmall->Create(IDB_SMALL,18,1,RGB(0,0,0));

m_wndList.SetImageList(pILSmall,LVSIL_SMALL);

//3设置列

m_wndList.InsertColumn(0,L"名称",LVCFMT_LEFT,150);

m_wndList.InsertColumn(1,L"大小",LVCFMT_LEFT,80);

m_wndList.InsertColumn(2,L"类型",LVCFMT_LEFT,80);

m_wndList.InsertColumn(3,L"修改日期",LVCFMT_LEFT,100);

//4插入测试数据

m_wndList.InsertItem(0,L"文件",1);

m_wndList.SetItemText(0,1,L"15");

m_wndList.SetItemText(0,2,L"文件");

m_wndList.SetItemText(0,3,L"2012-03-06");

m_wndList.InsertItem(1,L"文件夹",0);

m_wndList.SetItemText(1,1,L"12");

m_wndList.SetItemText(1,2,L"文件夹");

m_wndList.SetItemText(1,3,L"2011-03-06");

//5显示C盘根目录下的所有文件和文件夹

//ShowFile(L"c:\\");

//6设置控件的背景色

m_wndList.SetBkColor(RGB(200,200,200));

m_wndList.SetTextColor(RGB(255,0,0));

m_wndList.SetTextBkColor(CLR_NONE);

//7设置控件的背景图片

m_wndList.SetBkImage(L"res\\MFCList.ico");

}

voidCMFCListDlg::ShowFile(CStringstrPath)

{

//添加数据前,先清空原有数据

m_wndList.DeleteAllItems();

intindex=0;//添加数据项的索引

CFileFindfind;

BOOLbRet=find.FindFile(strPath+"*.*");

while(bRet)

{

bRet=find.FindNextFileW();

if(find.IsDirectory())

{

m_wndList.InsertItem(index,find.GetFileName(),0);

m_wndList.SetItemText(index,2,L"文件夹");

}

else

{

m_wndList.InsertItem(index,find.GetFileName(),1);

DWORDnLen=find.GetLength();

CStringstrLen;

strLen.Format(L"%d",nLen);

m_wndList.SetItemText(index,1,strLen);

}

//保存路径

CString*pPath=newCString;

*pPath=find.GetFilePath();

m_wndList.SetItemData(index,(DWORD)pPath);

index++;

}

find.Close();//结束查找

}


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-36344-3.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    热点图片
    拼命载入中...