CPropertyPage::OnApply

This member function is called by the framework when the user chooses the OK or the Apply Now button.

virtual BOOL OnApply( );

Return Value

Nonzero if the changes are accepted; otherwise 0.

Remarks

When the framework calls this function, changes made on all property pages in the property sheet are accepted, the property sheet retains focus, and OnApply returns TRUE (the value 1). Before OnApply can be called by the framework, you must have called SetModified and set its parameter to TRUE. This will activate the Apply Now button as soon as the user makes a change on the property page.

Override this member function to specify what action your program takes when the user clicks the Apply Now button. When overriding, the function should return TRUE to accept changes and FALSE to prevent changes from taking effect.

The default implementation of OnApply calls OnOK.

For more information about notification messages sent when the user presses the Apply Now or OK button in a property sheet, see PSN_APPLY in the Windows SDK.

Example

See the example for CPropertyPage::OnOK.

Requirements

Header: afxdlgs.h

See Also

Reference

CPropertyPage Class

Hierarchy Chart

CPropertyPage::SetModified

CPropertyPage::OnOK

Other Resources

CPropertyPage Members