If I insert an ActiveX / OCX on a form at design time and add a member variable of that type using ClassWizard, all is well and I can use that object quite happily. But how can I create an instance of that OCX wrapper class on the fly? <br><br>For example, if I wanted to create a different type of OCX depending on a choice from a menu, how do I go about that? I'm almost certain that constructing the object using the generated wrapper class is not good enough. I assume I need to still generate the wrapper class first, but I don't know where to go next...<br><br>Is it anything to do with CoCreateInstance()? If so, how do I specify its parent window? Questions, questions...<br><br>