[MFC-ActiveX] Inserting an ActiveX into an ActiveX

This is a discussion on [MFC-ActiveX] Inserting an ActiveX into an ActiveX within the Windows Programming forums, part of the Platform Specific Boards category; I tried to include a WMP control into my activex, but it didn't work.. could anyone post me a sample ...

  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    69

    [MFC-ActiveX] Inserting an ActiveX into an ActiveX

    I tried to include a WMP control into my activex, but it didn't work..

    could anyone post me a sample code that does this?
    thanx

  2. #2
    Registered User
    Join Date
    Mar 2005
    Posts
    69
    In my control class, i have a CWnd member , acting as the wrapper window for WMP.

    When i try to create the control, i call the CWnd::CreateControl method of that class member, and its return value is non zero, indicating success.

    but after that, the wmp control (whose ProgID is "WMPlayer.OCX.7") will not be visualized.

    i tried with another control ("mscal.calendar"), and the result is the same.

    then i created a web page which displays both the controls above (using <object> tags), for verifying that they work, and they do.. when i open the page with internet explorer they are correctly visualized.

    i also have tried to visualize them in an MFC application that creates a DialogBox.. and inside the dialog box those controls are correctly inserted and visualized.. but in my activex they don't.

    perhaps the parent window specified in the CWnd::CreateControl method MUST be a CDialog??? in my activex, the parent window is a COleControl, is that the problem?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Inserting ActiveX controls using command-line compiler
    By geophyzzer in forum Windows Programming
    Replies: 0
    Last Post: 10-28-2002, 12:34 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21