If you did not select ActiveX controls when you created the MFC project , you need to call coinitialize and couninitialize in your main code .
如果在创建mfc项目时未选择“activex控件”,则需要在主代码中调用coinitialize和couninitialize。