`
mybwu_com
  • 浏览: 179720 次
  • 性别: Icon_minigender_1
社区版块
存档分类
最新评论

warning MIDL2039 : interface does not conform to [oleautomation] attribute : [ Parameter ... ...

 
阅读更多

1.MFC编写Activex控件,使用classwizard添加automation method,在所有使用BOOL参数的地方都出现下如下警告:warning MIDL2039 : interface does not conform to

[oleautomation] attribute : [ Parameter ... ...
修改odl文件中出错的boolean为VARIANT_BOOL即可

2.学习ActiveX开发该看的书《Visual C++ 5 Active X编程指南》
学习COM该看的书《Inside COM》《COM原理与应用》

3.创建一个容器,让控件在其范围内移动
控件容器实现 ISimpleFrameSite 接口,在 MSDN 中搜索 Extending ATL 3.0 Control Containment to Help You Write Real-world Containers

4.在COM方法中使用try...catch
在Project|Settings|C/C++|C++ Language下选中Enable Exception Handling

5.Activex控件区别设计时和运行时
判断run-mode和design-mode的方法是CComControl::GetAmbientUserMode,见MSDN

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics