IPropertyPage::Activate

Creates the dialog box for the property page (without a frame, caption, or system menu/controls) using hWndParent as the parent window and prc as the positioning rectangle. The bModal flag indicates the modality of the dialog box frame (in the current implementation of OleCreatePropertyFrame and OleCreatePropertyFrameIndirect, this parameter is always TRUE). The text in the dialog should match the locale obtained through IPropertyPageSite::GetLocaleID.

The property page maintains the window handle created in this process, which it uses to destroy the dialog box within IPropertyPage::Deactivate.

HRESULT Activate(
  HWND hWndParent ,  //Parent window handle
  LPCRECT prc ,      //Pointer to RECT structure
  BOOL bModal        //Dialog box frame is modal or modeless
);
 

Parameters

hWndParent
[in] Window handle of the parent of the dialog box that is being created.
prc
[in] Pointer to the RECT structure containing the positioning information for the dialog box. This method must create its dialog box with the placement and dimensions described by this rectangle, that is, origin point at (prc->left, prc->top) and dimensions of (prc->right-prc->Left, prc->bottom-prc->top).
bModal
[in] Indicates whether the dialog box frame is modal (TRUE) or modeless (FALSE).

Return Values

This method supports the standard return values E_OUTOFMEMORY and

E_UNEXPECTED, as well as the following:

S_OK
The page dialog box was created successfully.
E_POINTER
The address in prc is not valid. For example, it may be NULL.

Remarks

Notes to Implementers

E_NOTIMPL is not a valid return value.

QuickInfo

  Windows NT: Use version 4.0 or later.
  Windows: Use Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in ocidl.h.

See Also

IPropertyPage::Activate