I want to get the icon of the file or shortcut that is dropped and
draded into the window. How could I do this?
Now, I try to do this by modify the program of
How to Implement Drag and Drop Between Your Program and Explorer
I want to extract the icon of the Imagelist structure
and modify the code as below:
mm_imglist = c_FileList.GetImageList(LVSIL_SMALL);
int x = mm_imglist->GetImageCount();
CRect rect (imageinfo.rcImage);
bmp.CreateCompatibleBitmap (&dc, rect.Width (), rect.Height ());
CBitmap* pBmpOld = dcMem.SelectObject (&bmp);
mm_imglist->DrawIndirect (&dcMem, 0, CPoint (0, 0), CSize (rect.Width (), rect.Height ()), CPoint (0, 0));
But what I extract is not the icon I put into the window, and I find the mm_imglist is not change after I put the file.
Please give a help and thanks all.