void YourWnd::OnDropFiles(HDROP hDropInfo) { TCHAR *lpszFileName=new TCHAR[512]; int nFileCount =::DragQueryFile(hDropInfo,0xFFFFFFFF,NULL,512); for(int i=0;i <nFileCount;i++) { UINT nChars=::DragQueryFile(hDropInfo,i,lpszFileName,512); //your file name is lpszFileName } ::DragFinish (hDropInfo); delete []lpszFileName; } |
|