Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

developer:sdksamples:activexcontrols [2015/09/14] (current)
Line 1: Line 1:
 +====== Using ActiveX Controls in Plug-ins ======
 +> **Developer:​** //​[[developer:​cplusplusplugins|C++]]//​
 +> **Summary:​** //Discusses how to use ActiveX controls in C++ plug-ins.//
 +
 +===== Question =====
 +I am facing a critical problem regarding a C++ plug-in under Rhino: any ActiveX controls placed in a simple dialog box will crash Rhino. What can I do solve this?
 +
 +===== Answer =====
 +ActiveX, or OLE, controls work in Rhino plug-ins, as plug-in are simply regular MFC DLLs. For more information on MFC DLLs, read [[http://​msdn.microsoft.com/​en-us/​library/​hw85e4bb(v=VS.80).aspx|MFC Technical Note 33]] and [[http://​msdn.microsoft.com/​en-us/​library/​ft1t4bbc(v=VS.80).aspx|MFC Technical Note 58]] for more information.
 +
 +Also, you will need to call this function:
 +
 +<code c++>
 +void AfxEnableControlContainer();​
 +</​code>​
 +
 +in your CWinApp-derived object'​s InitInstance() member to enable support for
 +containment of OLE controls.
 +
 +[[http://​msdn.microsoft.com/​en-us/​library/​k194shk8(v=VS.80).aspx|More information on MFC ActiveX Controls...]]
 +
 +\\
 +
 +{{tag>​Developer cplusplus}}
 +
  
developer/sdksamples/activexcontrols.txt ยท Last modified: 2015/09/14 (external edit)