Bonjour,
J'ai besoin d'afficher des thumbnails dans une liste.
Voici mon code qui pour l'instant est cens� afficher une simple image :
Code : S�lectionner tout - Visualiser dans une fen�tre � part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
		CBitmap *bmp1;
		CxImage image;
		CString bmpPath;
		bmpPath.Format(file_name);
		bmpPath.Format("%s.bmp",bmpPath.Left(bmpPath.ReverseFind('.')));
		bmpPath = GetFilePath(bmpPath.GetBuffer(bmpPath.GetLength()));
		image.Load(bmpPath.GetBuffer(bmpPath.GetLength()), CXIMAGE_FORMAT_BMP);
		HBITMAP handlebitmap = NULL;
		handlebitmap = image.MakeBitmap(m_ListFiles.GetDC()->m_hDC);
		bmp1 = bmp1->FromHandle(handlebitmap);
 
 
		CImageList imageList;
		imageList.Create(105,143,ILC_COLOR16,1,5);
		int imgP=imageList.Add(bmp1,RGB(0,0,0));
 
		m_ListFiles.SetImageList(&imageList,LVSIL_STATE);
Tout semble bien se d�rouler depuis le d�bogueur (imageList.Add renvoie bien 0), cependant l'image n'apparait pas dans la liste.
Je n'arrive pas � trouver la source du probl�me.

Faut-il obligatoirement travailler avec une liste vierge, ou ayant certaines caract�ristiques sp�ciales permettant l'insertion d'une imageList ?
Y'a-t-il une fonction qui m'a �chapp� qui force l'affichage ?

J'ai lu dans une discussion que la classe CImageList contenait des bugs, qu'en pensez vous ?

Merci d'avance pour vos suggestions.