Creates a property frame, that is, a property sheet dialog box, based on a structure (OCPFIPARAMS) that contains the parameters, rather than specifying separate parameters as when calling OleCreatePropertyFrame.
STDAPI OleCreatePropertyFrameIndirect(
OCPFIPARAMS* pParams //Pointer to the structure of parameters for
// dialog box
);
This function supports the standard return values E_INVALIDARG, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following:
Besides cbStructSize (the size of the structure) and dispIDInitialProperty, all of the members of the OCPFIPARAMS structure have the same semantics as the parameters for OleCreatePropertyFrame. When dispIDInitialProperty is DISPID_UNKNOWN, the behavior of the two functions is identical.
Working in conjunction with IPerPropertyBrowsing and IPropertyPage2, dispIDInitialProperty allows the caller to specify which single property should be highlighted when the dialog box is made visible. This feature is not available when using OleCreatePropertyFrame. To determine the page and property to show initially, the property frame will do the following:
(*lplpUnk)->QueryInterface(IID_IPerPropertyBrowsing, ...)
to get an interface pointer to the first object.IPerPropertyBrowsing::MapPropertyToPage(dispIDInitialProperty, ...)
to determine which page CLSID contains the property to be highlighted. All objects for which this frame is being invoked must support the set of properties displayed in the frame.IPropertyPage2::EditProperty(dispIDInitialProperty)
to highlight the correct field in that dialog box.
Windows NT: Use version 4.0 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in olectl.h.
Import Library: Included as a resource in olepro32.dll.
OCPFIPARAMS, OleCreatePropertyFrame