Page 1 of 1
DLL to change WMP visulizations on the fly.
Posted: Sun Jan 27, 2008 2:12 am
by TimeSurfer
I was wondering if anyone could point me in the right direction or give me some info on how to change the visualizations in windows media player on the fly. i know i can change them in the registry but the changes dont take effect till the next run wmp is ran or its ocx. ams uses the wmp ocx to create a wmp object plugin. i need to make a dll that can change the visualizations instantly like you can in windows media player itself.
if you have any questions as to what type of info i need id be happy to answer as i have been scowering for info to no avail
Re: DLL to change WMP visulizations on the fly.
Posted: Sun Jan 27, 2008 2:39 am
by thorax
TimeSurfer wrote:I was wondering if anyone could point me in the right direction or give me some info on how to change the visualizations in windows media player on the fly. i know i can change them in the registry but the changes dont take effect till the next run wmp is ran or its ocx. ams uses the wmp ocx to create a wmp object plugin. i need to make a dll that can change the visualizations instantly like you can in windows media player itself.
if you have any questions as to what type of info i need id be happy to answer as i have been scowering for info to no avail
As i know, <b>all</b> components from wmp (exept the exe itsself) are com-objects. You can try to send wmp a message to change the visualizations. The follow example is for play, pause and stop wmp. I don't know the right constants for change the visualizations.
Code: Select all
#APPCOMMAND_MEDIA_STOP = $d0000
#APPCOMMAND_MEDIA_PLAY_PAUSE = $e0000
#APPCOMMAND_MEDIA_PLAY = $2e0000
#APPCOMMAND_MEDIA_PAUSE = $2f0000
myHandle = FindWindow_("WMPlayerApp", "Windows Media Player")
If myHandle <> 0
SendMessage_(myHandle, #WM_APPCOMMAND, 0, #APPCOMMAND_MEDIA_PLAY)
Delay(10000)
SendMessage_(myHandle, #WM_APPCOMMAND, 0, #APPCOMMAND_MEDIA_STOP)
EndIf
Posted: Sun Jan 27, 2008 3:40 am
by TimeSurfer
thanks thorax this at least gives me some basis to go on. thanks much
Posted: Sun Jan 27, 2008 3:58 am
by SFSxOI
You could dig out the interfaces, create the objects, and then build your .dll that way too. Its not so hard to do once you get the interfaces defined correctly. But...that might be a little too much for what you want to do so the send message thing as suggested above might suit your needs a little better.
Posted: Fri Feb 01, 2008 2:55 am
by TimeSurfer
well i downloaded the sdk for wmp10 last night and have been going through it although alot of it is hard to understand cause im not a c coder but i have found the IWMPEFFECTS and IWMPEFFECTS2 are the 2 interfaces that control visualizations but more over what i was looking at in the sdk was the effects.nexteffect and effect.previouseffect as they allow you to switch the effect and as long as you set effects.allowall to true the enduser can cycle through all the effects installed on their system
i just cant figure out how i would implement this in pb. also i believe the visualizations are com objects as is the dll that controls them but i suk at com lol
Posted: Wed Feb 27, 2008 6:36 am
by TimeSurfer
can anyone give me any insight on how to port those over to pb so i can use them. I'm not wanting anyone to do it for me, but some help would be greatly appreciated as i have no idea where to start. So far all i have determined is which interfaces i need to use. I just dont know how to use them lol.
Posted: Tue Oct 14, 2008 11:33 am
by eriansa
It looks like those interfaces are not public.
(i've tried it in VB, but no luck)