Is it possible to set Media Player control like this?
Hi, ALL,
Is it possible to set some kind of property so that Media Player 10 displays only control panel?
I know there is a button on it so that when you click it is displaying this in compact mode as explained here link 1, but I want to do it programmatically.
Thank you.
Re: IS it possible to set Media Player control like this?
Re: IS it possible to set Media Player control like this?
Hi,
The code uses Windows Media Player as ActiveX control. It just references a lot of properties and functions that is used in there.
And yes - it does use an SDK and all different interfaces.
Thank you.
Re: IS it possible to set Media Player control like this?
So, why don't you want to read the docs about using Media Player ActiveX control and Media Player SDK?
Re: IS it possible to set Media Player control like this?
I did, but couldn't find anything...
I tried to use this:
Code:
if( show )
{
// m_pWMPPlayer->put_uiMode(wxBasicString(wxT("compact")).Get());
m_pWMPSettings->setMode(wxBasicString(wxT("compact")).Get(), VARIANT_TRUE );
m_pWMPPlayer->put_enabled(VARIANT_TRUE);
}
else
{
m_pWMPPlayer->put_uiMode(wxBasicString(wxT("full")).Get());
m_pWMPPlayer->put_enabled(VARIANT_TRUE);
}
but it does not do anything.
Thank you.
Re: IS it possible to set Media Player control like this?
What is m_pWMPPlayer?
Is your system "Windows Media Player 10 Mobile"? If yes then have a look at http://msdn.microsoft.com/en-us/libr...v=vs.85).aspx:
Quote:
Windows Media Player 10 Mobile: This method only specifies a BSTR set to "none" or "full". On Smartphone devices, only playback status and a counter are displayed when setting uiMode to "full".
Re: IS it possible to set Media Player control like this?
Victor,
No, it's a laptop.
The Player says I have:
Windows Media Player Version 12.0.7601.17514.
Is version 12 a culprit? Does it have the same interface as 10?
Thank you.
Re: IS it possible to set Media Player control like this?
Quote:
Originally Posted by
OneEyeMan
Is version 12 a culprit? Does it have the same interface as 10?
Doesn't documentation say anything about it? :confused:
BTW, you didn't answer my question:
Quote:
Originally Posted by
VictorN
What is m_pWMPPlayer?
Re: IS it possible to set Media Player control like this?
Quote:
Originally Posted by
VictorN
Doesn't documentation say anything about it? :confused:
BTW, you didn't answer my question:
To answer your question:
Code:
IWMPPlayer* m_pWMPPlayer;
Thank you.
Re: IS it possible to set Media Player control like this?
Quote:
Originally Posted by
OneEyeMan
I did, but couldn't find anything...
I tried to use this:
Code:
if( show )
{
// m_pWMPPlayer->put_uiMode(wxBasicString(wxT("compact")).Get());
m_pWMPSettings->setMode(wxBasicString(wxT("compact")).Get(), VARIANT_TRUE );
m_pWMPPlayer->put_enabled(VARIANT_TRUE);
}
else
{
m_pWMPPlayer->put_uiMode(wxBasicString(wxT("full")).Get());
m_pWMPPlayer->put_enabled(VARIANT_TRUE);
}
but it does not do anything.
Thank you.
And what do all these methods return?
Re: IS it possible to set Media Player control like this?
Quote:
Originally Posted by
VictorN
And what do all these methods return?
Code:
virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_uiMode(
/* [in] */ BSTR pbstrMode) = 0;
virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE setMode(
/* [in] */ BSTR bstrMode,
/* [in] */ VARIANT_BOOL varfMode) = 0;
virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_enabled(
/* [in] */ VARIANT_BOOL pbEnabled) = 0;
Maybe WMP 12 does not support "compact" mode? Or maybe it just can't be set thru the API, only thru the running interface?
Thank you.
Re: IS it possible to set Media Player control like this?
Quote:
Originally Posted by
OneEyeMan
Code:
virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_uiMode(
/* [in] */ BSTR pbstrMode) = 0;
virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE setMode(
/* [in] */ BSTR bstrMode,
/* [in] */ VARIANT_BOOL varfMode) = 0;
virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_enabled(
/* [in] */ VARIANT_BOOL pbEnabled) = 0;
:confused:
I didn't ask you about these methods' signatures! I know it. :cool:
What do they return in your case? Or didn't you debug your code? :confused:
Quote:
Originally Posted by
OneEyeMan
Maybe WMP 12 does not support "compact" mode? Or maybe it just can't be set thru the API, only thru the running interface?
Maybe. At least MSDN doesn't mention this word in IWMPPlayer description here
Re: IS it possible to set Media Player control like this?
Is there a way to speak with someone in MS about it for FREE?
Thank you.
Re: IS it possible to set Media Player control like this?
Maybe Microsoft Connect?
BTW, you haven't answer my question yet:
Quote:
Originally Posted by Victor
What do they return in your case? Or didn't you debug your code?
Re: IS it possible to set Media Player control like this?
Both of them return S_OK.
If I uncomment the first line it returns E_INVALIDARG.
Thank you.