|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Jan 2007
Posts: 4
|
General purpose plugin doesn't appear in media library window anymore
Hello,
I developed a general purpose plugin for my client about 3 years ago. Everything was ok but some of the latest winamp releases broke the plugin (which is a lyrics visualization opening IE inside media library window). Depending on the winamp skin, the folowing happen: - the IE window don't appear inside the media library - the IE window appear in a small part of the media library window I'm using all the stuff to activate media library window and the FindWindow chain: HWND hWnd = FindWindow( "BaseWindow_RootWnd", "Media Library" ); hWnd = FindWindowEx( hWnd, NULL, "BaseWindow_RootWnd", "Winamp Library" ); hWnd = FindWindowEx( hWnd, NULL, "Winamp Gen", "Winamp Library" ); hWnd = FindWindowEx( hWnd, NULL, "#32770", 0 ); hWnd = FindWindowEx( hWnd, NULL, "#32770", 0 ); The media library window IS visible but the window chain is not complete at winamp load. I tried tons of messages using SendMessage to activate the previous window chain but without any success Thanks for any help |
|
|
|
|
|
#2 |
|
-
Join Date: Sep 2003
Location: UK
Posts: 22,474
|
you'd be better off doing it as a native media library plugin (if that is how you're providing the information) so that you know for certain that the media library is loaded.
if not the other way to do it is via a timer or use of PostMessage(..) to a handler/subclassed window with a custom message identifier (see IPC_REGISTER_WINAMP_IPCMESSAGE in wa_ipc.h) and use that to effectively delay your loading so everything needed will be in place to use. then again, from what you've posted, i'm not too surprised you've having issues as it looks rather hacky (though i'm a bit uncertain about what you're doing is meant to be like - am betting there's a much cleaner way to do what you're trying to achieve). -daz |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jan 2007
Posts: 4
|
Well, so I have to rewrite the plugin.
I started some tests. It seems that some basic funcionality doesn't work anymore. At first I just need to get an idea on how much I have to rewrite. Could you help me ? This is an example: get current music information. The code below works ok with the previous plugin (gen_), but inside the new ml_ plugin, "filename" is returned ok, but artist (artista) and music (musica) are not: // Inside the new winproc and if (msg == WM_WA_IPC) case IPC_PLAYING_FILE: { long currentSong; char *filename; currentSong=SendMessage (SampleHTTP.hwndLibraryParent,WM_WA_IPC,0,IPC_GETLISTPOS); filename = (char*)wParam; char retvalue[256]; extendedFileInfoStruct einfo; memset(&einfo, 0, sizeof(extendedFileInfoStruct)); einfo.filename = filename; einfo.metadata = "Artist"; einfo.ret = retvalue; einfo.retlen = 256; SendMessage( SampleHTTP.hwndLibraryParent, WM_WA_IPC, (WPARAM)&einfo, IPC_GET_EXTENDED_FILE_INFO ); string artista = retvalue; memset(&einfo, 0, sizeof(extendedFileInfoStruct)); einfo.filename = filename; einfo.metadata = "Title"; einfo.ret = retvalue; einfo.retlen = 256; SendMessage( SampleHTTP.hwndLibraryParent, WM_WA_IPC, (WPARAM)&einfo, IPC_GET_EXTENDED_FILE_INFO ); string musica = retvalue; char *title = (char*)SendMessage( SampleHTTP.hwndLibraryParent, WM_WA_IPC, getPlaylistIndex(), IPC_GETPLAYLISTTITLE ); string playlistTitle = title; g_musica = musica; g_artista = artista; g_playlistTitle = playlistTitle; g_filename = filename; } Thanks for any help ! |
|
|
|
|
|
#4 |
|
-
Join Date: Sep 2003
Location: UK
Posts: 22,474
|
if that is what you're using then you need to be using SampleHTTP.hwndWinampParent instead of SampleHTTP.hwndLibraryParent as 'hwndLibraryParent' is the media library window handle and not the Winamp window handle (where those api's are handled)
-daz |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|