AfxEnableControlCon

来源:互联网 发布:centos grub引导修复 编辑:程序博客网 时间:2024/06/08 11:55

Call this function in your application object’s InitInstance function to enable support for containment of OLE controls.
之前在程序中遇到个问题:别的OCX调用我DLL里面的窗口显示,窗口上也有OCX,此时窗口怎么也不显示出来;但是单独创建一个对话框程序调用该DLL却能显现;最后究其原因还是没有调用AfxEnableControlContainer();

得出结论:1.要想把控件或者窗体作为容器显示OCX得调用AfxEnableControlContainer();

原创粉丝点击