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
A:
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.
fretje
2010-03-29 08:33:31
This will do. I could enumerate and fetch the control and get the IUnknown pointer. Then I try to get my interface.
Gopalakrishnan Subramani
2010-03-29 09:13:21