# IPropertyPage::Deactivate

Destroys the window created in IPropertyPage::Activate.

HRESULT Deactivate(void);

Return Values

This method supports the standard return value E_UNEXPECTED, as well as the following:

S_OK
  The dialog was successfully destroyed.

Remarks

#### Notes to Implementers

It is important that property pages not keep the dialog box around as an optimization. In a property sheet with many property pages, memory consumption would become excessive if all property pages kept their dialog boxes created at all times. Destroying the dialog box prevents excessive memory consumption due to a very large number of created controls in the dialog boxes. If the frame wishes to keep pages alive while they are not visible, it can use IPropertyPage::Show for that purpose. The decision is ultimately left to the frame.

E_NOTIMPL is not a valid return value.

See Also

IPropertyPage::Activate