OleCreatePropertyFrame Function

Invokes a new property frame, that is, a property sheet dialog box, whose parent is hwndOwner, where the dialog is positioned at the point (x,y) in the parent window and has the caption lpszCaption.

Syntax

C++
HRESULT OleCreatePropertyFrame(
  __in  HWND hwndOwner,
  __in  UINT x,
  __in  UINT y,
  __in  LPCOLESTR lpszCaption,
  __in  ULONG cObjects,
  __in  LPUNKNOWN *ppUnk,
  __in  ULONG cPages,
  __in  LPCLSID pPageClsID,
  __in  LCID lcid,
  __in  DWORD dwReserved,
  __in  LPVOID pvReserved
);

Parameters

hwndOwner [in]

Handle to the parent window of the resulting property sheet dialog box.

x [in]

Reserved. Horizontal position for the dialog box relative to hwndOwner.

y [in]

Reserved. Vertical position for the dialog box relative to hwndOwner.

lpszCaption [in]

Pointer to the string used for the caption of the dialog box.

cObjects [in]

Number of object pointers passed in ppUnk.

ppUnk [in]

An array of IUnknown pointers on the objects for which this property sheet is being invoked. The number of elements in the array is specified by cObjects. These pointers are passed to each property page through IPropertyPage::SetObjects.

cPages [in]

Number of property pages specified in pPageCIsID.

pPageClsID [in]

Array of size cPages containing the CLSIDs of each property page to display in the property sheet.

lcid [in]

Locale identifier to use for the property sheet. Property pages can retrieve this identifier through IPropertyPageSite::GetLocaleID.

dwReserved [in]

Reserved for future use; must be zero.

pvReserved [in]

Reserved for future use; must be NULL.

Return Value

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

Return codeDescription
S_OK

The dialog box was invoked and operated successfully.

E_POINTER

The address in lpszCaption, ppUnk, or pPageCIsID is not valid. For example, any one of them may be NULL.

 

Remarks

The property pages to be displayed are identified with pPageClsID, which is an array of cPagesCLSID values. The objects that are affected by this property sheet are identified in ppUnk, an array of size cObjects containing IUnknown pointers.

This function always creates a modal dialog box and does not return until the dialog box is closed.

Requirements

Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderOleCtl.h
LibraryOleAut32.lib
DLLOleAut32.dll

See Also

IPropertyPage::SetObjects
IPropertyPageSite::GetLocaleID

Send comments about this topic to Microsoft

Build date: 10/22/2009

Tags :


Page view tracker