/////////////////////////////////////////////////////////////////////////////
//++
//
//  CFileShareSampleParamsPage::DoDataExchange
//
//  Description:
//      Do data exchange between the dialog and the class.
//
//  Arguments:
//      pDXIn
//          Data exchange object.
//
//  Return Value:
//      None.
//
//--
/////////////////////////////////////////////////////////////////////////////
void
CFileShareSampleParamsPage::DoDataExchange(
    CDataExchange * pDXIn
    )
{
    if ( ! pDXIn->m_bSaveAndValidate || ! BSaved() )
    {
        AFX_MANAGE_STATE( AfxGetStaticModuleState() );

        //
        //  TODO: Modify the following lines to represent the data displayed on this page.
        //

        //  {{AFX_DATA_MAP(CFileShareSampleParamsPage)
        DDX_Control( pDXIn, IDC_PP_FILESHARESAMPLE_SHARENAME, m_editShareName );
        DDX_Control( pDXIn, IDC_PP_FILESHARESAMPLE_PATH, m_editPath );
        DDX_Text( pDXIn, IDC_PP_FILESHARESAMPLE_SHARENAME, m_strShareName );
        DDX_Text( pDXIn, IDC_PP_FILESHARESAMPLE_PATH, m_strPath );
        DDX_Text( pDXIn, IDC_PP_FILESHARESAMPLE_REMARK, m_strRemark );
        DDX_Text( pDXIn, IDC_PP_FILESHARESAMPLE_MAXUSERS, m_nMaxUsers );
        //}}AFX_DATA_MAP

        //
        //  Handle numeric parameters.
        //

        if ( ! BBackPressed() )
        {
            DDX_Number(
                  pDXIn
                , IDC_PP_FILESHARESAMPLE_MAXUSERS
                , m_nMaxUsers
                , static_cast< DWORD >( 0 )
                , static_cast< DWORD >( 4294967295 )
                , FALSE /*bSigned*/
                );
        } // if: back button not pressed

        //
        //  TODO: Add any additional field validation here.
        //

        if ( pDXIn->m_bSaveAndValidate )
        {
            //
            //  Make sure all required fields are present.
            //

            if ( ! BBackPressed() )
            {
                DDV_RequiredText( pDXIn, IDC_PP_FILESHARESAMPLE_SHARENAME, IDC_PP_FILESHARESAMPLE_SHARENAME_LABEL, m_strShareName );
                DDV_RequiredText( pDXIn, IDC_PP_FILESHARESAMPLE_PATH, IDC_PP_FILESHARESAMPLE_PATH_LABEL, m_strPath );
            } // if: back button not pressed
        } // if: saving data from dialog
    } // if: not saving or haven't saved yet

    CBasePropertyPage::DoDataExchange( pDXIn );

} //*** CFileShareSampleParamsPage::DoDataExchange
Beispiel #2
0
/////////////////////////////////////////////////////////////////////////////
//++
//
//	CBasePropertyPage::DoDataExchange
//
//	Routine Description:
//		Do data exchange between the dialog and the class.
//
//	Arguments:
//		pDX		[IN OUT] Data exchange object 
//
//	Return Value:
//		None.
//
//--
/////////////////////////////////////////////////////////////////////////////
void CBasePropertyPage::DoDataExchange(CDataExchange * pDX)
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState());

	//{{AFX_DATA_MAP(CBasePropertyPage)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
	DDX_Control(pDX, IDC_PP_ICON, m_staticIcon);
	DDX_Control(pDX, IDC_PP_TITLE, m_staticTitle);

	if (pDX->m_bSaveAndValidate)
	{
		if (!BBackPressed())
		{
			CWaitCursor	wc;

			// Validate the data.
			if (!BSetPrivateProps(TRUE /*bValidateOnly*/))
				pDX->Fail();
		}  // if:  Back button not pressed
	}  // if:  saving data from dialog
	else
	{
		// Set the title.
		DDX_Text(pDX, IDC_PP_TITLE, m_strTitle);
	}  // if:  not saving data

	CPropertyPage::DoDataExchange(pDX);

}  //*** CBasePropertyPage::DoDataExchange()
/////////////////////////////////////////////////////////////////////////////
//++
//
//  CBasePropertyPage::DoDataExchange
//
//  Description:
//      Do data exchange between the dialog and the class.
//
//  Arguments:
//      pDXIn
//          Data exchange object
//
//  Return Value:
//      None.
//
//--
/////////////////////////////////////////////////////////////////////////////
void
CBasePropertyPage::DoDataExchange(
    CDataExchange * pDXIn
    )
{
    if ( ! pDXIn->m_bSaveAndValidate || ! BSaved() )
    {
        AFX_MANAGE_STATE( AfxGetStaticModuleState() );

        //{{AFX_DATA_MAP(CBasePropertyPage)
            // NOTE: the ClassWizard will add DDX and DDV calls here
        //}}AFX_DATA_MAP

        DDX_Control( pDXIn, IDC_PP_ICON, m_staticIcon );
        DDX_Control( pDXIn, IDC_PP_TITLE, m_staticTitle );

        if ( pDXIn->m_bSaveAndValidate )
        {
            if ( ! BBackPressed() )
            {
                CWaitCursor wc;

                //
                //  Validate the data.
                //

                if ( ! BSetPrivateProps( TRUE /*fValidateOnlyIn*/ ) )
                {
                    pDXIn->Fail();
                } // if: error setting private properties
            } // if: Back button not pressed
        } // if: saving data from dialog
        else
        {
            //
            //  Set the title.
            //

            DDX_Text( pDXIn, IDC_PP_TITLE, m_strTitle );
        } // if: not saving data
    }  // if: not saving or haven't saved yet

    //
    //  Call the base class method.
    //

    CPropertyPage::DoDataExchange( pDXIn );

} //*** CBasePropertyPage::DoDataExchange