Introduction to control methods and properties for MFC-based media player player

Source: Internet
Author: User
Tags string format

Copyright Notice: This article for Bo Master original article, without Bo Master permission not reproduced.

Because of the use of third-party multimedia libraries or third-party controls (media Player) for secondary playback, we have to understand some of the properties of the Media Player control

and methods. Let's describe some common methods and properties.

The following two pictures are the class libraries of the controls we import, and some of the methods and properties we use are all contained in the following file.

>>. CWMPPlayer4

1 CString GetUrl ();2     //get the specified position3     voidSetUrl (LPCTSTR lpsznewvalue);4     //Setting the location of a file5 cwmpcontrols getcontrols ();6     //Association Cwmpcontrols7 cwmpsettings getsettings ();8     //Association Cwmpsettings9 Cwmpmedia Getcurrentmedia ();Ten     //Association Cwmpmedia One cwmpmediacollection getmediacollection (); A     //Association Cwmpmediacollection - cwmpplaylistcollection getplaylistcollection (); -     //Association Cwmpplaylistcollection the CString getversioninfo (); -     //Get version Information - cwmpnetwork getnetwork (); -     //Association Cwmpnetwork + cwmpplaylist getcurrentplaylist (); -     //Association Cwmpplaylist +     voidsetcurrentplaylist (lpdispatch newvalue); A     //Set the current playlist at cwmpcdromcollection getcdromcollection (); -     //Association Cwmpcdromcollection - cwmpclosedcaption getclosedcaption (); -     //Association Cwmpclosedcaption - BOOL getisonline (); -     //determine whether online (networked) in cwmperror GetError (); -     //Association Cwmperror Class to CString GetStatus (); +     //Get Status - Cwmpdvd Getdvd (); the     //Association Cwmpdvd Class * cwmpplaylist newplaylist (lpctstr bstrname, LPCTSTR bstrurl); $     //Create a new listPanax Notoginseng Cwmpmedia NewMedia (LPCTSTR bstrurl); -     //the URL of the new list the BOOL Getfullscreen (); +     //determines whether the current player is full screen A     voidSetfullscreen (BOOL bnewvalue); the     //sets the current player to full screen or not full screen (true indicates full screen, false if not) +     voidSetuimode (LPCTSTR lpsznewvalue); -     //Player interface mode, available for full, Mini, None, Invisible $ CString Getuimode (); $     //Get player Mode -     voidOpenplayer (LPCTSTR bstrurl); -     //Open the MediaPlayer player that comes with your Windows system

>>. Cwmpcontrols

1 BOOL getisavailable (LPCTSTR bstritem);2     voidplay ();3     //Play function4     voidstop ();5     //Stop function6     voidpause ();7     //Pause function8     voidFastforward ();9     //Fast Forward functionTen     voidfastreverse (); One     //Fast Rewind function A     Doublegetcurrentposition (); -     //gets the current playback progress, returning double type data -     voidSetCurrentPosition (Doublenewvalue); the     //set the current progress - CString getcurrentpositionstring (); -     //get current progress, return CString type data; format: string format. such as "00:23" -     voidnext (); +     //Next Song -     voidprevious (); +     //Previous Song A     LongGetcurrentmarker (); at  -     voidSetcurrentmarker (Longnnewvalue); -     voidPlayitem (lpdispatch piwmpmedia); - 3. Cwmpsettings - BOOL Getautostart (); -     //gets whether the current is in AutoPlay in     voidSetautostart (BOOL bnewvalue); -     //set whether to play automatically to BOOL Getmute (); +     //gets whether the current volume is in the auto-play State -     voidSetmute (BOOL bnewvalue); the     //sets whether the current is muted (true mute, false No) *     LongGetplaycount (); $     //Get Play CountPanax Notoginseng     voidSetplaycount (Longnnewvalue); -     //set the number of times to play the     LongGetvolume (); +     //get the current volume size A     voidSetVolume (Longnnewvalue); the     //Set Volume size

These are basically the usual methods: if you want to learn more, you can view the documentation information for media palyer: (link below, click Media Player SDK)

Media Player SDK

Introduction to control methods and properties for MFC-based media player player

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.