J'ai un problème vraiment bizarre, j'ai mis déja des heures a trouver d'ou ca venait, mais là je craque je ne comprends pas. En fait je veux faire un drag and drop en utilisant une image qui contient du texte et une icone. Pour ca j'utilise les fonctions ImageList_BeginDrag, ImageList_DragEnter ..., mais pour ca il faut avant que je crée la bitmap en question, et c'est la qu'il y a un problème. Je fais comme ca:
HIMAGELIST himl;
HDC hdc, hmem;
HBITMAP hbmp;
hdc = GetDC(hWnd);
hmem = CreateCompatibleDC(hdc);
hbmp = CreateCompatibleBitmap(hdc, 100, 100);
SelectObject(hmem, hbmp);
TextOut(hmem, 20, 0, "e", 1);
DrawIconEx(hmem, 0, 0, hicon, 16, 16, 0, 0, DI_NORMAL);
DeleteDC(hmem);
ReleaseDC(hWnd, hdc);
himl = ImageList_Create(100, 100, ILC_COLOR32 | ILC_MASK, 1, 0);
ImageList_Add(himl, hbmp, 0);
ImageList_BeginDrag(himl, 0, 0, 0);
ImageList_DragEnter(hWnd, xCur, yCur);
le problème c'est que j'obtiens des résultats différents en fonction de la présence ou non d'une ressource de type RT_MANIFEST.
Par ailleurs j'avoue ne pas très bien comprendre la notion de masque (que dois-je mettre exactement dans la fonction ImageList_Add??)
Si quelqu'un pouvait m'aider ce serait vraiment sympa
Pour aller plus vite, j'ai mis un projet déja tout fait qui met en évidence ce problème:
http://vecchio56.free.fr/DragAndDrop.zip
merci