Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

OleCreatePropertyFrameIndirect function

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.


HRESULT OleCreatePropertyFrameIndirect(
  _In_  LPOCPFIPARAMS lpParams


lpParams [in]

Pointer to the caller-allocated structure containing the creation parameters for the dialog box.

Return value

This function supports the standard return values E_INVALIDARG, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following:

Return codeDescription

The dialog box was invoked and operated successfully.


The address in lpParams is not valid. For example, it may be NULL.



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:

  1. Call (*ppUnk)->QueryInterface(IID_IPerPropertyBrowsing, ...) to get an interface pointer to the first object.
  2. Call 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.
  3. When the dialog box is created, the property page with the CLSID retrieved in Step 2 is activated with IPropertyPage::Activate.
  4. The property frame queries the active page for IPropertyPage2.
  5. If successful, the frame calls IPropertyPage2::EditProperty(dispIDInitialProperty) to highlight the correct field in that dialog box.


Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]







See also




Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.