Connexion rapide:  

Forum: VirtualDJ Plugins

Sujet Where's my plugin window?

Ce topic est ancien et peut contenir des informations obselètes ou incorrectes.

khourigHome userMember since 2013
I create a window in the OnGetUserInterface function. In the debugger, I can see the messages arriving at the window, but my window never appears on screen.

I tried creating a test app that loads the plugin the same way that VDJ does, and I get the plugin window that I expect.
 

Posté Sun 07 Jul 13 @ 10:52 pm
SBDJPRO Infinity Member since 2006
You did pass the handle back to VDJ right?
 

Posté Mon 08 Jul 13 @ 9:09 am
khourigHome userMember since 2013
Yes I returned the window handle. I'm not using MFC, just register a window class and create the window. I'm passing all messages to DefWindowProc except WM_CREATE where I'm saving that extra CreateWindow lparam with SetWindowLongPtr, which I reserved space for when registering the window class.

Someone is pumping messages to my window, including hiding it, because from the debugger I can see these messages arriving.

Could it be because I'm using the Home Free version? If so, what level of VDJ do I need?

Thanks for your attention.
 

Posté Mon 08 Jul 13 @ 11:31 am
SBDJPRO Infinity Member since 2006
Post up the relevant code and I will have a quick look.
 

Posté Mon 08 Jul 13 @ 11:47 am
khourigHome userMember since 2013
Ok here's the code.

virtual HRESULT __stdcall OnGetUserInterface( HWND *hWnd )
{
WNDCLASS wc_info;
memset( &wc_info, 0, sizeof( wc_info ) );
wc_info.style = CS_HREDRAW | CS_VREDRAW;
wc_info.lpfnWndProc = WindowProc;
wc_info.cbClsExtra = 0;
wc_info.cbWndExtra = sizeof( this );
wc_info.hInstance = IVdjPlugin::hInstance;
wc_info.hIcon = 0;
wc_info.hCursor = 0;
wc_info.hbrBackground = (HBRUSH)( 1 + COLOR_WINDOW );
wc_info.lpszMenuName = nullptr;
wc_info.lpszClassName = "RemoteDJ_WndClass";
RegisterClass( &wc_info );

*hWnd = CreateWindowEx( 0, "RemoteDJ_WndClass", "Remote DJ", WS_CAPTION | WS_SYSMENU | WS_VISIBLE, 0, 0, Width, Height, 0, 0, IVdjPlugin::hInstance, this );

return NO_ERROR;
}

LRESULT CALLBACK WindowProc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
{
switch (msg)
{
case WM_CREATE:
{
LPCREATESTRUCT cs = (LPCREATESTRUCT)lparam;
SetWindowLongPtr( hwnd, 0, (uintptr_t)cs->lpCreateParams );
return 0;
}
}
return DefWindowProcA( hwnd, msg, wparam, lparam );
}


Using Window Spy, I see that VDJ has reparented my window. If VDJ ever decided to make that new parent window visible, my window would be visible within it.

Since I'm writing a generic plugin, how can I ever see the UI for it? For effects, DSPs, video plugins, they can be selected in the effects tab. I don't see my plugin mentioned anywhere. In some screen shots I see an "Others" tab that I don't have.

When I didn't give the window handle back to VDJ, I had a free floating window around, like I initially expected, but since there was no parent/child relationship between them, the main VDJ window kept getting in front of mine.
 

Posté Mon 08 Jul 13 @ 11:55 pm
SBDJPRO Infinity Member since 2006
If you are writing a 'generic' plugin, presumably against the IVdjPlugin class rather than one of the more specific classes, then you'll need Virtual DJ Pro Full for it to function correctly - as you have seen you are missing the 'Others' section in plugin which is where these appear.

I would guess this is why your window will never be shown by VDJ - because that section isn't present.

I wouldn't rely on the function of this class of plugin in anything other than Pro Full.
 

Posté Tue 09 Jul 13 @ 8:49 am
khourigHome userMember since 2013
Hm. As I suspected. Thanks again!
 

Posté Tue 09 Jul 13 @ 10:45 am


(Les anciens sujets et forums sont automatiquement fermés)