Share via


CPropertyPage::OnApply

virtual BOOL OnApply( );

Return Value

Nonzero if the changes are accepted; otherwise 0.

Remarks

This member function is called by the framework when the user chooses the OK or the Apply Now button. 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 in the Win32 documentation.

Example

See the example for CPropertyPage::OnOK.

CPropertyPage OverviewClass MembersHierarchy Chart

See Also   CPropertyPage::SetModified, CPropertyPage::OnOK