|
-
July 26th, 2012, 02:03 AM
#1
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.
Last edited by OneEyeMan; July 26th, 2012 at 03:10 AM.
Reason: Typo in the title
-
July 26th, 2012, 02:59 AM
#2
Re: IS it possible to set Media Player control like this?
Victor Nijegorodov
-
July 26th, 2012, 03:08 AM
#3
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.
-
July 26th, 2012, 03:23 AM
#4
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?
Victor Nijegorodov
-
July 26th, 2012, 03:37 AM
#5
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.
-
July 26th, 2012, 03:51 AM
#6
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:
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".
Victor Nijegorodov
-
July 26th, 2012, 01:38 PM
#7
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.
-
July 31st, 2012, 05:31 AM
#8
Re: IS it possible to set Media Player control like this?
 Originally Posted by OneEyeMan
Is version 12 a culprit? Does it have the same interface as 10?
Doesn't documentation say anything about it? 
BTW, you didn't answer my question:
 Originally Posted by VictorN
What is m_pWMPPlayer?
Victor Nijegorodov
-
July 31st, 2012, 10:43 AM
#9
Re: IS it possible to set Media Player control like this?
 Originally Posted by VictorN
Doesn't documentation say anything about it?
BTW, you didn't answer my question:
To answer your question:
Code:
IWMPPlayer* m_pWMPPlayer;
Thank you.
-
July 31st, 2012, 11:05 AM
#10
Re: IS it possible to set Media Player control like this?
 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?
Victor Nijegorodov
-
August 2nd, 2012, 03:01 AM
#11
Re: IS it possible to set Media Player control like this?
 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.
-
August 2nd, 2012, 03:11 AM
#12
Re: IS it possible to set Media Player control like this?
 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;

I didn't ask you about these methods' signatures! I know it. 
What do they return in your case? Or didn't you debug your code? 
 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
Victor Nijegorodov
-
August 2nd, 2012, 03:29 AM
#13
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.
-
August 2nd, 2012, 04:04 AM
#14
Re: IS it possible to set Media Player control like this?
Maybe Microsoft Connect?
BTW, you haven't answer my question yet:
 Originally Posted by Victor
What do they return in your case? Or didn't you debug your code?
Victor Nijegorodov
-
August 2nd, 2012, 12:16 PM
#15
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|