How can i embedded the Windows Media Player in my application to play compressed avi's ? RRS feed

  • Question

  • Hello there,

    i have really bad problems to embedded the Windows Media Player Active X control in my Application. I use the Visual Studio 2008 version
    and i write a MFC project as SDI with a popup dialog who should have the player to play avi files. I have install all requirement things Windows Media Player version 10 and the Windows Media Player SDK 10.

    What i have tried out already.....

    - In the dialog that should play the avi file. I added with an right click  the active x control for the windows media player. At next i create a variable for it. Thats the first point i was wondering about. The created wrapper class coxc1  don't have  functions like get_controls(), put_URL() etc.

    - Ok then i use an older version of Visual Studio to build the wrapper class with it. Now i have all needed functions. Then i add these files the ocx1.h/.cpp to my project.

    - Then i tried to use the object in this way:

    CComPtr<IWMPControls> pCon;

    Now i thougth the player would play the avi file. But it fails,neither the Media Player shows nor the avi file playing. I forgot to say that i can compile my code without errors
    I have tested so much things but nothing work. Could anyone explain me how i play an avi file in a embedded Media Player window?

    Thanks in advance,


    PS: Sorry for my bad English :-(

    Wednesday, December 3, 2008 9:21 PM


All replies