/////////////////////////////////////////////////////////////////////////////
//++
//
//  CBasePropertyPage::OnWizardFinish
//
//  Description:
//      Handler for the PSN_WIZFINISH message.
//
//  Arguments:
//      None.
//
//  Return Value:
//      FALSE
//          Don't change the page.
//
//      TRUE
//          Change the page.
//
//--
/////////////////////////////////////////////////////////////////////////////
BOOL
CBasePropertyPage::OnWizardFinish( void )
{
    ASSERT( BWizard() );

    AFX_MANAGE_STATE( AfxGetStaticModuleState() );

    CWaitCursor wc;

    //
    //  BUG! There should be no need to call UpdateData in this function.
    //  See BUG: Finish Button Fails Data Transfer from Page to Variables
    //  KB Article ID: Q150349
    //

    //
    //  Update the data in the class from the page.
    //

    if ( UpdateData( TRUE /*bSaveAndValidate*/ ) == FALSE )
    {
        return FALSE;
    } // if: error updating data

    // Save the data in the sheet.
    if ( BApplyChanges() == FALSE )
    {
        return FALSE;
    } // if: error applying changes

    return CPropertyPage::OnWizardFinish();

} //*** CBasePropertyPage::OnWizardFinish
/////////////////////////////////////////////////////////////////////////////
//++
//
//  CBasePropertyPage::OnApply
//
//  Description:
//      Handler for the PSM_APPLY message.
//
//  Arguments:
//      None.
//
//  Return Value:
//      TRUE
//          Page successfully applied.
//
//      FALSE
//          Error applying page.
//
//--
/////////////////////////////////////////////////////////////////////////////
BOOL
CBasePropertyPage::OnApply( void )
{
    ASSERT( ! BWizard() );

    AFX_MANAGE_STATE( AfxGetStaticModuleState() );

    CWaitCursor wc;

    if ( BApplyChanges() == FALSE )
    {
        return FALSE;
    } // if: error applying changes

    return CPropertyPage::OnApply();

} //*** CBasePropertyPage::OnApply
예제 #3
0
/////////////////////////////////////////////////////////////////////////////
//++
//
//	CBasePropertyPage::OnApply
//
//	Routine Description:
//		Handler for the PSM_APPLY message.
//
//	Arguments:
//		None.
//
//	Return Value:
//		TRUE	Page successfully applied.
//		FALSE	Error applying page.
//
//--
/////////////////////////////////////////////////////////////////////////////
BOOL CBasePropertyPage::OnApply(void)
{
	ASSERT(!BWizard());

	AFX_MANAGE_STATE(AfxGetStaticModuleState());

	CWaitCursor	wc;

	// Update the data in the class from the page.
	if (!UpdateData(TRUE /*bSaveAndValidate*/))
		return FALSE;

	if (!BApplyChanges())
		return FALSE;

	return CPropertyPage::OnApply();

}  //*** CBasePropertyPage::OnApply()
예제 #4
0
/////////////////////////////////////////////////////////////////////////////
//++
//
//	CBasePropertyPage::OnWizardNext
//
//	Routine Description:
//		Handler for the PSN_WIZNEXT message.
//
//	Arguments:
//		None.
//
//	Return Value:
//		-1		Don't change the page.
//		0		Change the page.
//
//--
/////////////////////////////////////////////////////////////////////////////
LRESULT CBasePropertyPage::OnWizardNext(void)
{
	ASSERT(BWizard());

	AFX_MANAGE_STATE(AfxGetStaticModuleState());

	CWaitCursor	wc;

	// Update the data in the class from the page.
	if (!UpdateData(TRUE /*bSaveAndValidate*/))
		return -1;

	// Save the data in the sheet.
	if (!BApplyChanges())
		return -1;

	// Create the object.

	return CPropertyPage::OnWizardNext();

}  //*** CBasePropertyPage::OnWizardNext()
/////////////////////////////////////////////////////////////////////////////
//++
//
//  CBasePropertyPage::OnWizardNext
//
//  Description:
//      Handler for the PSN_WIZNEXT message.
//
//  Arguments:
//      None.
//
//  Return Value:
//      -1
//          Don't change the page.
//
//      0
//          Change the page.
//
//--
/////////////////////////////////////////////////////////////////////////////
LRESULT
CBasePropertyPage::OnWizardNext( void )
{
    ASSERT( BWizard() );

    AFX_MANAGE_STATE( AfxGetStaticModuleState() );

    CWaitCursor wc;

    //
    //  Update the data in the class from the page.
    //  This necessary because, while OnKillActive() will call UpdateData(),
    //  it is called after this method is called, and we need to be sure that
    //  data has been saved before we apply them.
    //

    if ( ! UpdateData( TRUE /*bSaveAndValidate*/ ) )
    {
        return -1;
    } // if: error updating data

    //
    //  Save the data in the sheet.
    //

    if ( BApplyChanges() == FALSE )
    {
        return -1;
    } // if: error applying changes

    //
    //  Create the object.
    //

    return CPropertyPage::OnWizardNext();

} //*** CBasePropertyPage::OnWizardNext