WinCE 4.2 Easy to invoke the Windows Media Player control

Source: Internet
Author: User
Tags knowledge base

Younger brother is a just beginner, now everyone is doing embedded development, so I also come to join in the fun. Rookie is rookie, this is not, now want to play in the WinCE4.2 wma, MP3 music, but even a winodws Media player control do not know how to call. People do not laugh ah, before I in the Winodws2000 platform, feeling call this control is very simple, but under the WinCE4.2 platform is out of the way. Why, then? The reason is that program development based on WinCE4.2 platform is done on platforms such as Windows2000, but Windows Media Player controls that are raised on the Windows2000 platform cannot be used on WinCE4.2 platforms. I think most of my friends have met this problem.

Although the Windows Media Player control is a good thing, it is impossible for beginners to do.

Some people say, you can use COM! Boss, COM for us this rookie, that is really use is not as good as not, a smattering of not to use, and also used for white, I found a lot of information, with COM call Windows Media Player control but still no sound, I do not know which step is wrong. What's the deal? Do we these rookie really can't do embedded development? I'm frowning, brooding!

No way, Vista!

Rookie of the Gospel!

After I was digging in the net, I finally found a little prospect. The first thing to be clear is that the Windows Media Player control in the WinCE4.2 operating system is actually version 6.4, not the 9.0 version that appears on its interface. So we've all been cheated, and Gates gets the 6.4 version when the 9.0 edition sells. The other thing to be clear is that the 6.4 controls in the WinCE4.2 operating system are exactly the same as the 6.4 version under Windows2000. Clear above two points, everything will be good to do!

First, execute the following command on the PC's [Start]-[]:

regsvr32 c:\windows\system32\wmp.dll/u

This means uninstalling the registration of Windows Media Player version 9.0 control. Then, execute the following command on the PC's [Start]-[]:

regsvr32 c:\windows\system32\msdxm.ocx

This means registering the Windows Media Player version 6.4 control.

Next, open eMbedded Visual C + + 4.0, build a favorite MFC dialog project for our rookie, and take the next step in the wizard by allowing ActiveX controls to be hooked. After completing the wizard, select [Components and controls] in [Add to Project] in the [Project] menu, eject the Componests and Controls Gallery dialog box, and open the registered ActiveX Controls folder, showing several entries, the last one is [Windows Media Player], select and click the [Insert] button, pop-up Confirm Classes dialog box, click OK button to determine. There should be a Windows Media Player control in the toolbar in the dialog editing window, which should be at the bottom of the box, as if it were a fork.

Now, drag a Windows Media Player control from the toolbar to the dialog box, and then create a variable in ClassWizard that points to the Windows Media Player control, and then it's not so hard for us rookies!

Finally, choose your own platform to compile a release version, and then run it on your embedded device to see if it feels like it's on the Windows2000 platform.

Now introduce the development environment and development platform of the younger brother:

PC Machine End:

Operating system: Windows XP Professional SP2

Development tools: eMbedded Visual C + + 4.0

Embedded Device side:

Operating system: Windows CE. Net 4.2

Hardware platform: Samsung 2410

Conclusion

This is the first time in the VC Knowledge Base published articles, although with the meat birds articles can not be compared, but this is my own experience, I believe that the same rookie or more, I hope this article on our vast number of rookie can play a little help!

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.