How do I Dynamically Add ActiveX Controls to a CWnd.

Discussion in 'C++' started by Doug Goodhew, Aug 20, 2003.

  1. Doug Goodhew

    Doug Goodhew Guest

    In the header file of a class Derived from a CWnd class I have
    imported the OCX.

    #import "msvbvm60.dll" rename("RGB", "myRGB") rename("EOF","myEOF")
    #import "GSEgrids.ocx"

    And created a pointer to the OCX

    GSEGrids::_GSEbaseGridPtr m_GSEBaseGrid;

    Then in the inilization of my cWnd class I have create an instance of
    the OCX

    m_GSEBaseGrid.CreateInstance("GSEGrids.GSEbaseGrid");

    After executing the above I can access all of the methods and
    properties of the OCX with no problem.

    The problem is I can't see how to make the OCX visible in my cWnd
    window.
     
    Doug Goodhew, Aug 20, 2003
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Christian H
    Replies:
    2
    Views:
    757
    Christian H
    Jul 23, 2003
  2. Angel
    Replies:
    5
    Views:
    2,741
  3. Jeremy S

    Dynamically add controls to a page

    Jeremy S, Mar 4, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    577
    Martin Dechev
    Mar 4, 2004
  4. David Freeman

    HowTo: Dynamically Add Custom Controls?

    David Freeman, Nov 3, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    604
    Matt Berther
    Nov 3, 2004
  5. Jeffrey Todd
    Replies:
    1
    Views:
    4,405
    Peter Blum
    Jun 2, 2005
  6. Replies:
    0
    Views:
    1,179
  7. vml
    Replies:
    0
    Views:
    1,311
  8. Chad Scharf
    Replies:
    3
    Views:
    1,117
    Chad Scharf
    Oct 18, 2007
Loading...