Hi,
i created my windowsForm in c# and this i import using tlb
here is my code
HRESULT _stdcall Plugin::OnGetUserInterface(HWND *hWnd)
{
MyInterop::IMyDotNetInterfacePtr pointer(__uuidof(MyInterop::MyDotNetClass));
ptr = pointer;
ptr-> ShowDialog();
return S_OK;
}
i am able to show windows form,i want when i drag song list from VirtualDJ it should be drop in my window.
when i select songs from any locations in my pc and drop it in my c# window it's work.
-----
need any handler for this?
how this can be done?
i created my windowsForm in c# and this i import using tlb
here is my code
HRESULT _stdcall Plugin::OnGetUserInterface(HWND *hWnd)
{
MyInterop::IMyDotNetInterfacePtr pointer(__uuidof(MyInterop::MyDotNetClass));
ptr = pointer;
ptr-> ShowDialog();
return S_OK;
}
i am able to show windows form,i want when i drag song list from VirtualDJ it should be drop in my window.
when i select songs from any locations in my pc and drop it in my c# window it's work.
-----
need any handler for this?
how this can be done?
Posted Wed 27 Jul 11 @ 5:51 am
OnGetUserInterface() is used to replace the standard VDJ interface with a window/dialog instead. To do this you need to pass the handle to your window back to VDJ in hWnd.
This would however not appear to be what you want - you're wanting to obtain song information via drag and drop?
This would however not appear to be what you want - you're wanting to obtain song information via drag and drop?
Posted Wed 27 Jul 11 @ 8:40 am
In C++, the idea is the following one:
HWND hWndParent;
HWND hWndPlugin;
CDialog pDialog;
HRESULT __stdcall CMyPlugin::OnLoad()
{
HRESULT hr;
hWndParent = NULL;
pDialog = NULL;
hr = GetInfo("hWnd",&hWndParent); // SDK 4
pDialog = new CDialog();
return S_OK;
}
//---------------------------------------------------------------------------
ULONG __stdcall CMyPlugin::Release()
{
if(pDialog!=NULL)
{
pDialog->Destroy();
delete pDialog;
}
delete this;
return 0;
}
//---------------------------------------------------------------------------
HRESULT __stdcall CMyPlugin::OnGetUserInterface(HWND *hWnd)
{
if(pDialog!=NULL)
{
hWndPlugin = pDialog->Create(hInstance,hWndParent,Width,Height);
*hWnd = hWndPlugin; // link our window to the VirtualDJ interface
}
return S_OK;
}
Posted Wed 27 Jul 11 @ 5:40 pm