CODE
LRESULT OnDrop(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
TCHAR buffer[MAX_PATH + 1];
HDROP hDrop = (HDROP)wParam;
int numOfFiles = DragQueryFile(hDrop, 0xFFFFFFFF, buffer, MAX_PATH);
if (numOfFiles == 1)
{
memset(buffer, 0, sizeof(buffer));
int bufsize = DragQueryFile(hDrop, 0, buffer, MAX_PATH);
if(bufsize > 0)
{
String filename(buffer);
if (filename.Mid(filename.GetLength()-4).CompareNoCase(_T(".ski")) == 0)
{
SavePlacement();
if (cfg_active == 0)
cfg_primary_look = string_utf8_from_os((LPCTSTR)buffer);
else
cfg_secondary_look = string_utf8_from_os((LPCTSTR)buffer);
LoadSkin();
return TRUE;
}
}
}
bHandled = FALSE;
::SendMessage(service_factory_base::get_main_window(),WM_DROPFILES,wParam,lParam);
return TRUE;
}
In the past it would load a new look if the extension matched or forward the WM_DROPFILES to foobar which was nice since you could drop playlists, mp3 files, etc. on my window and they'd get processed by foobar.
Doesn't work any more wrt to passing to foobar.
Does foobar doing something different with WM_DROPFILES now?