How to detect whether a control is standard or active-x control?

拥有回忆 提交于 2020-01-03 01:28:28

问题


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


回答1:


You can use CWnd::GetControlUnknown:

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.



来源:https://stackoverflow.com/questions/2536165/how-to-detect-whether-a-control-is-standard-or-active-x-control

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!