Hi everyone,
I'm trying to make a plugin out of an application I'm working on. The app in question supports drag and drop, basically using this:
case WM_DROPFILES:
{
// Drag and drop code
WORD m_iNumberOfFiles, i;
TCHAR m_file[STRLIMIT2]=_T("");
TCHAR m_files[STRLIMIT3]=_T("");
m_iNumberOfFiles = DragQueryFile((HDROP) wParam, 0xFFFFFFFF, NULL, 0);
if (m_iNumberOfFiles==1)
{
DragQueryFile( (HDROP) wParam, 1, m_file, sizeof(m_file));
_tcscpy(m_files, m_file);
bMultiSelect=FALSE;
}
else
{
for(i = 0; i < m_iNumberOfFiles; i++)
{
DragQueryFile( (HDROP) wParam, i, m_file, sizeof(m_file));
_tcscat(m_files, _T("\""));
_tcscat(m_files, m_file);
_tcscat(m_files, _T("\" "));
}
bMultiSelect=TRUE;
}
DragFinish((HDROP) wParam);
SetDlgItemText(wnd, IDC_EDIT1, m_files);
}
break;
Unfortunately, when I drag some files and drop them in the plugins dialog, the above code is invariably ignored and the files added to the current playlist. Would be helpful if you had an idea on this one =)
edit: to add that it uses the context menu command (like foo_infobox).