I am using WMP SDK to control Windows Media Player. I first created a new project using Windows Media Player Plug-in Wizard and then added code which communicates with my application using a named pipe. When my application needs music to be muted, for example, it send a message to the WMP plugin and then the plugin mutes the music:
CComPtr<IWMPSettings> settings;
if (SUCCEEDED(core_->get_settings(&settings)))
{
settings->put_mute(VARIANT_TRUE);
}
It works, and when I send commands, they get executed, but the UI doesn't get updated. So, for example, if I send a mute command, music gets muted (there's no sound), but the mute button still displays as if music isn't muted. To prove this, I can change the skin at this point or skip to another song, and the UI gets updated and correctly shows mute state. If I click it, it unmutes, and then again displays unmuted state (which is now the correct state).
So, is there any way to force refreshing of the UI, for example, or some other workaround?