CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11
  1. #1
    Join Date
    Sep 2008
    Posts
    7

    Unhappy Activex Support without MFC

    Hi,

    I'm trying to embed an activex object which in this case is the DxStudioPlayer provided by DxStudio http://www.dxstudio.com into a win32 application that is not MFC based it's a hand written win32 app. I've got next to no experience of this and have hit many dead ends whilst searching the web for information, I'm coming to the comclusion that no one has tried to do this. Is it possible to provide support in this way and if so where should I start? Is there any good resources you can suggest I read?

    Thanks

    Rob

  2. #2
    Join Date
    Sep 2005
    Location
    Nottingham
    Posts
    31

    Re: Activex Support without MFC

    I have tried to do this too.

    What I tried to do is add a dialog based resource, use the IDD_FORMVIEW template.

    right click on the newly created template, add ActiveX control, select the one you need and it will be created into the dialog box.

    now that you should have a dialog based resource with an embeded ActiveX control you need to put this into the main application window this is done with the CreateDialog() function, all that needs doing now is resizing the ActiveX control window and the dialog window so it fills the app window.

    hope this helps as a starting point

  3. #3
    Join Date
    Sep 2008
    Posts
    7

    Re: Activex Support without MFC

    Thats interesting can I use the CreateWindowEx call instead becuase I want to embed it as a child of the main window?

    Thanks

  4. #4
    Join Date
    Sep 2005
    Location
    Nottingham
    Posts
    31

    Re: Activex Support without MFC

    as long as the dialog resource has the Child value set as the Style property the dialog resource will be embeded into the main window.
    so CreateDialog will work fine

  5. #5
    Join Date
    Sep 2008
    Posts
    7

    Re: Activex Support without MFC

    Is there a reason why the add activex option is greyed out when I right click on the template?

  6. #6
    Join Date
    Sep 2005
    Location
    Nottingham
    Posts
    31

    Re: Activex Support without MFC

    All I can recommend is saving all, closing Visual Studio, and reopening it to see if that works

  7. #7
    Join Date
    Sep 2008
    Posts
    7

    Re: Activex Support without MFC

    Out of interested did this approach work with the activex component you where using?

  8. #8
    Join Date
    Sep 2005
    Location
    Nottingham
    Posts
    31

    Re: Activex Support without MFC

    it worked to embed the control but it was much harder to access the functions which I am still working on

  9. #9
    Join Date
    Sep 2008
    Posts
    7

    Question Re: Activex Support without MFC

    I found this article on the Microsoft support website http://support.microsoft.com/kb/192560 have you tried it out, it claims to provide activex support for any windows program.

  10. #10
    Join Date
    Jan 2008
    Posts
    48

    Re: Activex Support without MFC

    You don't need anything, neither MFC or ATL to host ActiveX
    It's included natively in windows (ocx class), without code.
    (method given on comp.os.ms-windows.programmer.win32 ng)

  11. #11
    Join Date
    Sep 2008
    Posts
    7

    Cool Re: Activex Support without MFC

    I've used the WPF on Win32 interface to embed the activex object in a wpf form and used it that way under win32 and it has worked very well.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured