如何检测控件是标准控件还是active-x控件? [英] How to detect whether a control is standard or active-x control?

查看:101
本文介绍了如何检测控件是标准控件还是active-x控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在MFC应用程序中,我们如何区分控件是CComboBox之类的标准控件还是自定义的active-x控件?

In MFC Application, how can we differentiate whether a control is a standard control like CComboBox or it is an custom active-x control?

推荐答案

您可以使用

You can use CWnd::GetControlUnknown:

返回值

指向 IUnknown 的界面 由此表示的OLE控件 CWnd 对象.如果该对象没有 代表一个OLE控件,返回 值为 NULL .

Return Value

A pointer to the IUnknown interface of the OLE control represented by this CWnd object. If this object does not represent an OLE control, the return value is NULL.

这篇关于如何检测控件是标准控件还是active-x控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆