怎样显示某一文件夹里面的所有图片以缩略图显示 小弟新手,说详细点!!谢谢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 还补充一点,要显示的窗口是一个切分为左右两部分的窗口,我想在右边直接显示在VIEW 上,在左边显示在List控件上,又应该怎样做? 就是一个文件夹管理器了嘛....可以在左边的list里面用一个文件夹管理的树型控件..到codeproject.com可以找到的...然后右边的view可以用listview..每次点击左边的树然后通知右边路劲更新..把文件依次读取出来..现实到listview里面就好了..不过最好采用多线程处理..不然要卡住的:) HBITMAP LoadPicture ( CString mFile //(I)File location ){ WCHAR wpath[MAX_PATH]; MultiByteToWideChar(CP_ACP, 0, mFile, -1, wpath, MAX_PATH); IPicture* pPic; OleLoadPicturePath(wpath, NULL, NULL, NULL, IID_IPicture, (LPVOID*)&pPic); if (pPic == NULL) return NULL; HBITMAP hPic = NULL; pPic->get_Handle((UINT*)&hPic); HBITMAP hPicRet = (HBITMAP)CopyImage(hPic, IMAGE_BITMAP, N_IMAGE_WIDTH, N_IMAGE_HEIGHT, LR_COPYDELETEORG); return hPicRet;}CImageList m_imageList;// Delete items DeleteAllItems(); // Delete imagelist m_imageList.DeleteImageList(); HIMAGELIST hScreens = ImageList_Create(N_IMAGE_WIDTH, N_IMAGE_HEIGHT, ILC_COLOR32, 0, 1); m_imageList.Attach(hScreens); // Set imagelist SetImageList(&m_imageList, LVSIL_NORMAL);//Create image for the file HBITMAP picImage = LoadPicture(strPptPath); if (NULL != picImage) { //Add Imagelist CBitmap* pImage = NULL; pImage = new CBitmap(); pImage->Attach(picImage); int nImageIndex = m_imageList.Add(pImage, PIC_COLOR); } 程序关闭后任务栏上的矩形部分不消失,怎么办? 求windows2000开发指南的附书光盘 关于用户登陆界面 如何学好数学,这是个问题,欢迎讨论,来者有分! 怎么使用宏来把隐藏菜单中的一个子菜单(100分) 关于MFC的苦恼 怎样在一个工程中加入另一个工程里的对话框摸板资源和对话框类 清除注册表垃圾 一个困扰了我很久的问题,请VC高手朋友进来 决定提一个有点难度的问题,关于new/delete 的重载 关于树控件的一点小问题 ADO data control 导航条 移动到第一条和最后一条记录再移动就出错?
CString mFile //(I)File location
)
{
WCHAR wpath[MAX_PATH];
MultiByteToWideChar(CP_ACP, 0, mFile, -1, wpath, MAX_PATH); IPicture* pPic;
OleLoadPicturePath(wpath, NULL, NULL, NULL, IID_IPicture, (LPVOID*)&pPic);
if (pPic == NULL) return NULL;
HBITMAP hPic = NULL;
pPic->get_Handle((UINT*)&hPic); HBITMAP hPicRet = (HBITMAP)CopyImage(hPic, IMAGE_BITMAP, N_IMAGE_WIDTH, N_IMAGE_HEIGHT, LR_COPYDELETEORG); return hPicRet;
}
CImageList m_imageList;
// Delete items
DeleteAllItems();
// Delete imagelist
m_imageList.DeleteImageList(); HIMAGELIST hScreens = ImageList_Create(N_IMAGE_WIDTH, N_IMAGE_HEIGHT, ILC_COLOR32, 0, 1);
m_imageList.Attach(hScreens);
// Set imagelist
SetImageList(&m_imageList, LVSIL_NORMAL);
//Create image for the file
HBITMAP picImage = LoadPicture(strPptPath);
if (NULL != picImage)
{
//Add Imagelist
CBitmap* pImage = NULL;
pImage = new CBitmap();
pImage->Attach(picImage);
int nImageIndex = m_imageList.Add(pImage, PIC_COLOR);
}