Although you now have the Property Inspector ActiveX control residing in your dialog box, you must get a pointer to its IUnknown interface before you can use it. This is accomplished by calling the GetControlUnknown() function on your newly created Property Inspector window. To reduce the amount of code you must write, you can use the ATL CComQIPtr smart pointer template class to contain the pointer that GetControlUnknown() returns. This smart pointer is specialized to retrieve the QueryInterface pointer for the interface name that you pass to it. It also automates reference counting by implementing the AddRef() and Release() methods. For the Property Inspector, the interface name you pass is IPropertyInspector.
Once you have instantiated the CComQIPtr and successfully initialized it with the pointer returned from GetControlUnknown(), you can use it to call IPropertyInspector methods directly.
You now have a dialog with a Property Inspector ActiveX control. However, you have yet to define the properties you want to display. To add properties, the Property Inspector queries your application for its property controls at runtime. You must implement and instantiate the interfaces that the Property Inspector uses to configure your property display.
Next you initialize the Property Inspector control. To update the control, you call its Reset() method with values that inform it of what is being edited and how.