View Full Version : Hooking playlist popup menu
30th June 2002, 00:39
How do I get the HMENU of the playlist's right-click popup menu? I'm wanting to add my own entry to the list, but the technique I use for the main winamp window is to use the wParam of the callback function. If I could get a callback hooked into the playlist....
Well, surely someone has figured it out :), any tips please?
30th June 2002, 02:48
ummm, if you can access the main window's param, why cant you access the playlist editors param? it has it's own class, it should act just like the main window, I think the class name is Winamp PE, not quite sure tho.
30th June 2002, 05:47
Well, I can't get the Playlist menu because I don't know how =).
For the main winamp window, I use these 2 lines to hook in:
lpWndProcOld = (void *) GetWindowLong(plugin.hwndParent,GWL_WNDPROC);
Then in my callback function, I wait for message=WM_INITMENUPOPUP and then insert my menu options if needed using wParam as the menu.
That grabs all the menus on the main winamp window....
So if I knew what to hook (instead of plugin.hwndParent) then I would be in business...
And if you want a bug for winamp 2.0, if you add an entry to the main winamp window's menu, don't make it the first entry on the list. If you do, then left-clicking the "O" to bring up the menu won't work. It's a slight bit more complicated than that (need to click a few other places), but that's the idea.
30th June 2002, 22:14
use FindWindow, with the class of "Winamp PE" to find the hwnd value :p
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.