佚名通过本文主要向大家介绍了mfc activex控件开发,mfc activex控件,mfc调用activex控件,mfc中activex控件,mfc添加activex控件等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: mfc开发的activex控件如何分辨处于设计模式还是运行模式?
描述:
解决方案1:
描述:
比方运行在vb的设计环境中还是运行在编译好的应用程序中.
解决方案1:
vb中可以用UserControl.Ambient.userMode得到编辑状态还是runtime状态,你的MFC控件提供一个SetUserMode方法,其中将控件切换到相应模式。
解决方案2: IsDebuggerPresent 函数没用?
BOOL IsDebuggerPresent();
解决方案4: 用这个函数
COleControl::AmbientUserMode
BOOL AmbientUserMode( );
Return Value
Nonzero if the container is in user mode; otherwise 0 (in design mode). If this property is not supported, this function returns 0.
一般是应用模式。