How to exchange data between property pages? 
Author Message
 How to exchange data between property pages?

Hi, there,
Is there anyway to pass variables input in one property
page to the others?
Thanks in advance.
Ann


Sun, 11 Sep 2005 17:46:34 GMT  
 How to exchange data between property pages?
    Take a look at the CPropertyPage::QuerySiblings() member function. You
can also store the information in the sheet and access it from the page.
Something like

    BOOL CYourPage::OnSetActive()
    {
        CYourPropertySheet* pSheet = STATIC_DOWNCAST(CYourPropertySheet,
GetParent());

        if ( pSheet )
            DWORD nData = pSheet->GetMyChangedData();
    }

--
Cheers
Check Abdoul [ VC++ MVP ]
-----------------------------------


Quote:
> Hi, there,
> Is there anyway to pass variables input in one property
> page to the others?
> Thanks in advance.
> Ann



Sun, 11 Sep 2005 18:28:02 GMT  
 How to exchange data between property pages?
The CPropertySheet parent.


Quote:
> Hi, there,
> Is there anyway to pass variables input in one property
> page to the others?
> Thanks in advance.
> Ann



Sun, 11 Sep 2005 18:49:08 GMT  
 How to exchange data between property pages?
Hello,
I was not very clear on the example of the QuerySiblings()
member fuction. I tried the other way but I got Assertion
failure error when I run to "CYourPropertySheet* pSheet =
STATIC_DOWNCAST(CYourPropertySheet,GetParent());"
Please, more help.
Ann

Quote:
>-----Original Message-----
>    Take a look at the CPropertyPage::QuerySiblings()

member function. You
Quote:
>can also store the information in the sheet and access it
from the page.
>Something like

>    BOOL CYourPage::OnSetActive()
>    {
>        CYourPropertySheet* pSheet = STATIC_DOWNCAST

(CYourPropertySheet,
Quote:
>GetParent());

>        if ( pSheet )
>            DWORD nData = pSheet->GetMyChangedData();
>    }

>--
>Cheers
>Check Abdoul [ VC++ MVP ]
>-----------------------------------



>> Hi, there,
>> Is there anyway to pass variables input in one property
>> page to the others?
>> Thanks in advance.
>> Ann

>.



Sun, 11 Sep 2005 20:03:37 GMT  
 How to exchange data between property pages?
    Post a sample of your code.

--
Cheers
Check Abdoul [ VC++ MVP ]
-----------------------------------


Quote:
> Hello,
> I was not very clear on the example of the QuerySiblings()
> member fuction. I tried the other way but I got Assertion
> failure error when I run to "CYourPropertySheet* pSheet =
> STATIC_DOWNCAST(CYourPropertySheet,GetParent());"
> Please, more help.
> Ann

> >-----Original Message-----
> >    Take a look at the CPropertyPage::QuerySiblings()
> member function. You
> >can also store the information in the sheet and access it
> from the page.
> >Something like

> >    BOOL CYourPage::OnSetActive()
> >    {
> >        CYourPropertySheet* pSheet = STATIC_DOWNCAST
> (CYourPropertySheet,
> >GetParent());

> >        if ( pSheet )
> >            DWORD nData = pSheet->GetMyChangedData();
> >    }

> >--
> >Cheers
> >Check Abdoul [ VC++ MVP ]
> >-----------------------------------



> >> Hi, there,
> >> Is there anyway to pass variables input in one property
> >> page to the others?
> >> Thanks in advance.
> >> Ann

> >.



Sun, 11 Sep 2005 21:04:10 GMT  
 How to exchange data between property pages?
I copied some of the codes here.
*************************************************
This page takes in the variable m_nCorR.
*************************************************
// LCCReliabilityA.cpp : implementation file
//

#include "stdafx.h"
#include "IStarTemp.h"
#include "LCCReliabilityA.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

///////////////////////////////////////////////////////////
//////////////////
// CLCCReliabilityA property page

IMPLEMENT_DYNCREATE(CLCCReliabilityA, CPropertyPage)

CLCCReliabilityA::CLCCReliabilityA() : CPropertyPage
(CLCCReliabilityA::IDD)
{
        //{{AFX_DATA_INIT(CLCCReliabilityA)
        m_dInnerSpan = 4.0;
        m_dJointHeight = 1.5;
        m_dMetalH = 5.0;
        m_sPadLength = _T("11.0");
        m_sPadWidth = _T("12.0");
        m_sPartHeight = _T("8.0");
        m_dPartLength = 20.0;
        m_sPartWidth = _T("10.0");
        m_sStenLength = _T("8.0");
        m_sStnThick = _T("12.0");
        m_sStnWidth = _T("5.0");
        m_sWetHeight = _T("100");
        m_nCorR = 0;
        //}}AFX_DATA_INIT

Quote:
}

CLCCReliabilityA::~CLCCReliabilityA()
{

Quote:
}

void CLCCReliabilityA::DoDataExchange(CDataExchange* pDX)
{
        CPropertyPage::DoDataExchange(pDX);
        //{{AFX_DATA_MAP(CLCCReliabilityA)
        DDX_Text(pDX, IDC_ED_INNERSPAN, m_dInnerSpan);
        DDX_Text(pDX, IDC_ED_JOINTHEIGHT, m_dJointHeight);
        DDX_Text(pDX, IDC_ED_METALHEIGHT, m_dMetalH);
        DDX_Text(pDX, IDC_ED_PADLENGTH, m_sPadLength);
        DDX_Text(pDX, IDC_ED_PADWIDTH, m_sPadWidth);
        DDX_Text(pDX, IDC_ED_PARTHEIGHT, m_sPartHeight);
        DDX_Text(pDX, IDC_ED_PARTLENGTH, m_dPartLength);
        DDX_Text(pDX, IDC_ED_PARTWIDTH, m_sPartWidth);
        DDX_Text(pDX, IDC_ED_STNLENGTH, m_sStenLength);
        DDX_Text(pDX, IDC_ED_STNTHICK, m_sStnThick);
        DDX_Text(pDX, IDC_ED_STNWIDTH, m_sStnWidth);
        DDX_Text(pDX, IDC_ED_WETHEIGHT, m_sWetHeight);
        DDX_Radio(pDX, IDC_RADIO_R, m_nCorR);

        //}}AFX_DATA_MAP

Quote:
}

BEGIN_MESSAGE_MAP(CLCCReliabilityA, CPropertyPage)
        //{{AFX_MSG_MAP(CLCCReliabilityA)
        ON_BN_CLICKED(IDC_BTTN_GEOMETRY, OnBttnGeometry)
        ON_EN_CHANGE(IDC_ED_PADLENGTH, OnChangeEdPadlength)
        ON_EN_CHANGE(IDC_ED_PADWIDTH, OnChangeEdPadwidth)
        ON_EN_CHANGE(IDC_ED_INNERSPAN, OnChangeEdInnerspan)
        ON_EN_CHANGE(IDC_ED_JOINTHEIGHT,
OnChangeEdJointheight)
        ON_EN_CHANGE(IDC_ED_PARTLENGTH,
OnChangeEdPartlength)
        ON_EN_CHANGE(IDC_ED_PARTWIDTH, OnChangeEdPartwidth)
        ON_EN_CHANGE(IDC_ED_PARTHEIGHT,
OnChangeEdPartheight)
        ON_EN_CHANGE(IDC_ED_METALHEIGHT,
OnChangeEdMetalheight)
        ON_EN_CHANGE(IDC_ED_STNLENGTH, OnChangeEdStnlength)
        ON_EN_CHANGE(IDC_ED_STNWIDTH, OnChangeEdStnwidth)
        ON_EN_CHANGE(IDC_ED_STNTHICK, OnChangeEdStnthick)
        ON_EN_CHANGE(IDC_ED_WETHEIGHT, OnChangeEdWetheight)
        ON_BN_CLICKED(IDC_BTTN_FRMR, OnBttnFrmr)
        ON_BN_CLICKED(IDC_RADIO_R, OnRadioR)
        ON_BN_CLICKED(IDC_RADIO_C, OnRadioC)
        //}}AFX_MSG_MAP
END_MESSAGE_MAP()

///////////////////////////////////////////////////////////
//////////////////
// CLCCReliabilityA message handlers

void CLCCReliabilityA::OnBttnGeometry()
{
        // TODO: Add your control notification handler
code here
        m_DlgLCCGeometry.DoModal();

Quote:
}

void CLCCReliabilityA::OnOK()
{
        // TODO: Add your specialized code here and/or
call the base class
        SetModified(FALSE);

        CPropertyPage::OnOK();

Quote:
}

void CLCCReliabilityA::OnCancel()
{
        // TODO: Add your specialized code here and/or
call the base class
        SetModified(FALSE);

        CPropertyPage::OnCancel();

Quote:
}

void CLCCReliabilityA::OnChangeEdPadlength()
{
        // TODO: If this is a RICHEDIT control, the
control will not
        // send this notification unless you override the
CPropertyPage::OnInitDialog()
        // function and call CRichEditCtrl().SetEventMask()
        // with the ENM_CHANGE flag ORed into the mask.

        // TODO: Add your control notification handler
code here
        SetModified();

Quote:
}

void CLCCReliabilityA::OnChangeEdPadwidth()
{
        // TODO: If this is a RICHEDIT control, the
control will not
        // send this notification unless you override the
CPropertyPage::OnInitDialog()
        // function and call CRichEditCtrl().SetEventMask()
        // with the ENM_CHANGE flag ORed into the mask.

        // TODO: Add your control notification handler
code here
        SetModified();

Quote:
}

void CLCCReliabilityA::OnChangeEdInnerspan()
{
        // TODO: If this is a RICHEDIT control, the
control will not
        // send this notification unless you override the
CPropertyPage::OnInitDialog()
        // function and call CRichEditCtrl().SetEventMask()
        // with the ENM_CHANGE flag ORed into the mask.

        // TODO: Add your control notification handler
code here
        SetModified();

Quote:
}

void CLCCReliabilityA::OnChangeEdJointheight()
{
        // TODO: If this is a RICHEDIT control, the
control will not
        // send this notification unless you override the
CPropertyPage::OnInitDialog()
        // function and call CRichEditCtrl().SetEventMask()
        // with the ENM_CHANGE flag ORed into the mask.

        // TODO: Add your control notification handler
code here
        SetModified();

Quote:
}

void CLCCReliabilityA::OnChangeEdPartlength()
{
        // TODO: If this is a RICHEDIT control, the
control will not
        // send this notification unless you override the
CPropertyPage::OnInitDialog()
        // function and call CRichEditCtrl().SetEventMask()
        // with the ENM_CHANGE flag ORed into the mask.

        // TODO: Add your control notification handler
code here
        SetModified();

Quote:
}

void CLCCReliabilityA::OnChangeEdPartwidth()
{
        // TODO: If this is a RICHEDIT control, the
control will not
        // send this notification unless you override the
CPropertyPage::OnInitDialog()
        // function and call CRichEditCtrl().SetEventMask()
        // with the ENM_CHANGE flag ORed into the mask.

        // TODO: Add your control notification handler
code here
        SetModified();

Quote:
}

void CLCCReliabilityA::OnChangeEdPartheight()
{
        // TODO: If this is a RICHEDIT control, the
control will not
        // send this notification unless you override the
CPropertyPage::OnInitDialog()
        // function and call CRichEditCtrl().SetEventMask()
        // with the ENM_CHANGE flag ORed into the mask.

        // TODO: Add your control notification handler
code here
        SetModified();

Quote:
}

void CLCCReliabilityA::OnChangeEdMetalheight()
{
        // TODO: If this is a RICHEDIT control, the
control will not
        // send this notification unless you override the
CPropertyPage::OnInitDialog()
        // function and call CRichEditCtrl().SetEventMask()
        // with the ENM_CHANGE flag ORed into the mask.

        // TODO: Add your control notification handler
code here
        SetModified();

Quote:
}

void CLCCReliabilityA::OnChangeEdStnlength()
{
        // TODO: If this is a RICHEDIT control, the
control will not
        // send this notification unless you override the
CPropertyPage::OnInitDialog()
        // function and call CRichEditCtrl().SetEventMask()
        // with the ENM_CHANGE flag ORed into the mask.

        // TODO: Add your control notification handler
code here
        SetModified();

Quote:
}

void CLCCReliabilityA::OnChangeEdStnwidth()
{
        // TODO: If this is a RICHEDIT control, the
control will not
        // send this notification unless you override the
CPropertyPage::OnInitDialog()
        // function and call CRichEditCtrl().SetEventMask()
        // with the ENM_CHANGE flag ORed into the mask.

        // TODO: Add your control notification handler
code here
        SetModified();

Quote:
}

void CLCCReliabilityA::OnChangeEdStnthick()
{
        // TODO: If this is a RICHEDIT control, the
control will not
        // send this notification unless you override the
CPropertyPage::OnInitDialog()
        // function and call CRichEditCtrl().SetEventMask()
        // with the ENM_CHANGE flag ORed into the mask.

        // TODO: Add your control notification handler
code here
        SetModified();

Quote:
}

void CLCCReliabilityA::OnChangeEdWetheight()
{
        // TODO: If this is a RICHEDIT control, the
control will not
        // send this notification unless you override the
CPropertyPage::OnInitDialog()
        // function and call CRichEditCtrl().SetEventMask()
        // with the ENM_CHANGE flag ORed into the mask.

        // TODO: Add your control notification handler
code here
        SetModified();

Quote:
}

void CLCCReliabilityA::OnBttnFrmr()
{
        // TODO: Add your control notification handler
code here
        UpdateData(TRUE);
        FILE *stream, *streamA;
        char line[256];
        int result;
        CString sParameter;
        CString sComment;
        CString sInputvalue;
        CSldFOpen SolderOpen;
        CString DataFileName, DataFileNameA;

        COleDateTime timeStart, timeEnd;
        COleDateTimeSpan spanElapsed;
        timeStart = COleDateTime::GetCurrentTime();
        SetModified(TRUE);

Quote:
}

void CLCCReliabilityA::OnRadioR()
{
        // TODO: Add your control notification handler
code here
        m_nCorR = 0;
        UpdateData(FALSE);
        SetModified(TRUE);

Quote:
}

void CLCCReliabilityA::OnRadioC()
{
        // TODO: Add your control notification handler
code here
        m_nCorR = 1;
        UpdateData(FALSE);
        SetModified(TRUE);

Quote:
}

int CLCCReliabilityA::GetChangedNumber()
{
        return m_nCorR;
Quote:
}

***********************************************************
This page needs to get the variable
**********************************************************
// LCCForm.cpp : implementation file
//

#include "stdafx.h"
#include "IStarTemp.h"
#include "LCCForm.h"
#include "LCCReliabilityA.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

///////////////////////////////////////////////////////////
//////////////////
// CLCCForm property page

IMPLEMENT_DYNCREATE(CLCCForm, CPropertyPage)

CLCCForm::CLCCForm() : CPropertyPage(CLCCForm::IDD)
{
        //{{AFX_DATA_INIT(CLCCForm)
        m_dStrainR = 0.0;
        m_iLifeCycle = 0;
        m_dCMaterial = 0.2;
        m_dCSpan = 0.2;
        m_dCTemp = 0.2;
        m_dCJHeight = 0.2;
        //}}AFX_DATA_INIT

Quote:
}

CLCCForm::~CLCCForm()
{

Quote:
}

void CLCCForm::DoDataExchange(CDataExchange* pDX)
{
        CPropertyPage::DoDataExchange(pDX);
        //{{AFX_DATA_MAP(CLCCForm)
        DDX_Text(pDX, IDC_EDIT_STRAIN, m_dStrainR);
        DDX_Text(pDX, IDC_EDIT_LIFEC, m_iLifeCycle);
        DDX_Text(pDX, IDC_EDIT_MATERIAL, m_dCMaterial);
        DDX_Text(pDX, IDC_EDIT_SPAN, m_dCSpan);
        DDX_Text(pDX, IDC_EDIT_TEMPR, m_dCTemp);
        DDX_Text(pDX, IDC_EDIT_HEIGHT, m_dCJHeight);
        //}}AFX_DATA_MAP

Quote:
}

BEGIN_MESSAGE_MAP(CLCCForm, CPropertyPage)
        //{{AFX_MSG_MAP(CLCCForm)
        ON_BN_CLICKED(IDC_BTTN_PDF, OnBttnPdf)
...

read more »



Sun, 11 Sep 2005 21:14:35 GMT  
 How to exchange data between property pages?
    The following casting is wrong.

    CLCCReliabilityA * pSheet = STATIC_DOWNCAST (CLCCReliabilityA,
GetParent());

    CLCCReliabilityA is not a sheet here. It is a page. You need to move the
GetChangedNumber() [ and probably an equivalent SetChangedNumber() ]  to the
Sheet.

    Hope this helps.

--
Cheers
Check Abdoul [ VC++ MVP ]
-----------------------------------

    Your casting is wrong.  You are casting


Quote:
> I copied some of the codes here.
> *************************************************
> This page takes in the variable m_nCorR.
> *************************************************
> // LCCReliabilityA.cpp : implementation file
> //

> #include "stdafx.h"
> #include "IStarTemp.h"
> #include "LCCReliabilityA.h"

> #ifdef _DEBUG
> #define new DEBUG_NEW
> #undef THIS_FILE
> static char THIS_FILE[] = __FILE__;
> #endif

> ///////////////////////////////////////////////////////////
> //////////////////
> // CLCCReliabilityA property page

> IMPLEMENT_DYNCREATE(CLCCReliabilityA, CPropertyPage)

> CLCCReliabilityA::CLCCReliabilityA() : CPropertyPage
> (CLCCReliabilityA::IDD)
> {
> //{{AFX_DATA_INIT(CLCCReliabilityA)
> m_dInnerSpan = 4.0;
> m_dJointHeight = 1.5;
> m_dMetalH = 5.0;
> m_sPadLength = _T("11.0");
> m_sPadWidth = _T("12.0");
> m_sPartHeight = _T("8.0");
> m_dPartLength = 20.0;
> m_sPartWidth = _T("10.0");
> m_sStenLength = _T("8.0");
> m_sStnThick = _T("12.0");
> m_sStnWidth = _T("5.0");
> m_sWetHeight = _T("100");
> m_nCorR = 0;
> //}}AFX_DATA_INIT
> }

> CLCCReliabilityA::~CLCCReliabilityA()
> {
> }

> void CLCCReliabilityA::DoDataExchange(CDataExchange* pDX)
> {
> CPropertyPage::DoDataExchange(pDX);
> //{{AFX_DATA_MAP(CLCCReliabilityA)
> DDX_Text(pDX, IDC_ED_INNERSPAN, m_dInnerSpan);
> DDX_Text(pDX, IDC_ED_JOINTHEIGHT, m_dJointHeight);
> DDX_Text(pDX, IDC_ED_METALHEIGHT, m_dMetalH);
> DDX_Text(pDX, IDC_ED_PADLENGTH, m_sPadLength);
> DDX_Text(pDX, IDC_ED_PADWIDTH, m_sPadWidth);
> DDX_Text(pDX, IDC_ED_PARTHEIGHT, m_sPartHeight);
> DDX_Text(pDX, IDC_ED_PARTLENGTH, m_dPartLength);
> DDX_Text(pDX, IDC_ED_PARTWIDTH, m_sPartWidth);
> DDX_Text(pDX, IDC_ED_STNLENGTH, m_sStenLength);
> DDX_Text(pDX, IDC_ED_STNTHICK, m_sStnThick);
> DDX_Text(pDX, IDC_ED_STNWIDTH, m_sStnWidth);
> DDX_Text(pDX, IDC_ED_WETHEIGHT, m_sWetHeight);
> DDX_Radio(pDX, IDC_RADIO_R, m_nCorR);

> //}}AFX_DATA_MAP
> }

> BEGIN_MESSAGE_MAP(CLCCReliabilityA, CPropertyPage)
> //{{AFX_MSG_MAP(CLCCReliabilityA)
> ON_BN_CLICKED(IDC_BTTN_GEOMETRY, OnBttnGeometry)
> ON_EN_CHANGE(IDC_ED_PADLENGTH, OnChangeEdPadlength)
> ON_EN_CHANGE(IDC_ED_PADWIDTH, OnChangeEdPadwidth)
> ON_EN_CHANGE(IDC_ED_INNERSPAN, OnChangeEdInnerspan)
> ON_EN_CHANGE(IDC_ED_JOINTHEIGHT,
> OnChangeEdJointheight)
> ON_EN_CHANGE(IDC_ED_PARTLENGTH,
> OnChangeEdPartlength)
> ON_EN_CHANGE(IDC_ED_PARTWIDTH, OnChangeEdPartwidth)
> ON_EN_CHANGE(IDC_ED_PARTHEIGHT,
> OnChangeEdPartheight)
> ON_EN_CHANGE(IDC_ED_METALHEIGHT,
> OnChangeEdMetalheight)
> ON_EN_CHANGE(IDC_ED_STNLENGTH, OnChangeEdStnlength)
> ON_EN_CHANGE(IDC_ED_STNWIDTH, OnChangeEdStnwidth)
> ON_EN_CHANGE(IDC_ED_STNTHICK, OnChangeEdStnthick)
> ON_EN_CHANGE(IDC_ED_WETHEIGHT, OnChangeEdWetheight)
> ON_BN_CLICKED(IDC_BTTN_FRMR, OnBttnFrmr)
> ON_BN_CLICKED(IDC_RADIO_R, OnRadioR)
> ON_BN_CLICKED(IDC_RADIO_C, OnRadioC)
> //}}AFX_MSG_MAP
> END_MESSAGE_MAP()

> ///////////////////////////////////////////////////////////
> //////////////////
> // CLCCReliabilityA message handlers

> void CLCCReliabilityA::OnBttnGeometry()
> {
> // TODO: Add your control notification handler
> code here
> m_DlgLCCGeometry.DoModal();
> }

> void CLCCReliabilityA::OnOK()
> {
> // TODO: Add your specialized code here and/or
> call the base class
> SetModified(FALSE);

> CPropertyPage::OnOK();
> }

> void CLCCReliabilityA::OnCancel()
> {
> // TODO: Add your specialized code here and/or
> call the base class
> SetModified(FALSE);

> CPropertyPage::OnCancel();
> }

> void CLCCReliabilityA::OnChangeEdPadlength()
> {
> // TODO: If this is a RICHEDIT control, the
> control will not
> // send this notification unless you override the
> CPropertyPage::OnInitDialog()
> // function and call CRichEditCtrl().SetEventMask()
> // with the ENM_CHANGE flag ORed into the mask.

> // TODO: Add your control notification handler
> code here
> SetModified();

> }

> void CLCCReliabilityA::OnChangeEdPadwidth()
> {
> // TODO: If this is a RICHEDIT control, the
> control will not
> // send this notification unless you override the
> CPropertyPage::OnInitDialog()
> // function and call CRichEditCtrl().SetEventMask()
> // with the ENM_CHANGE flag ORed into the mask.

> // TODO: Add your control notification handler
> code here
> SetModified();

> }

> void CLCCReliabilityA::OnChangeEdInnerspan()
> {
> // TODO: If this is a RICHEDIT control, the
> control will not
> // send this notification unless you override the
> CPropertyPage::OnInitDialog()
> // function and call CRichEditCtrl().SetEventMask()
> // with the ENM_CHANGE flag ORed into the mask.

> // TODO: Add your control notification handler
> code here
> SetModified();

> }

> void CLCCReliabilityA::OnChangeEdJointheight()
> {
> // TODO: If this is a RICHEDIT control, the
> control will not
> // send this notification unless you override the
> CPropertyPage::OnInitDialog()
> // function and call CRichEditCtrl().SetEventMask()
> // with the ENM_CHANGE flag ORed into the mask.

> // TODO: Add your control notification handler
> code here
> SetModified();

> }

> void CLCCReliabilityA::OnChangeEdPartlength()
> {
> // TODO: If this is a RICHEDIT control, the
> control will not
> // send this notification unless you override the
> CPropertyPage::OnInitDialog()
> // function and call CRichEditCtrl().SetEventMask()
> // with the ENM_CHANGE flag ORed into the mask.

> // TODO: Add your control notification handler
> code here
> SetModified();

> }

> void CLCCReliabilityA::OnChangeEdPartwidth()
> {
> // TODO: If this is a RICHEDIT control, the
> control will not
> // send this notification unless you override the
> CPropertyPage::OnInitDialog()
> // function and call CRichEditCtrl().SetEventMask()
> // with the ENM_CHANGE flag ORed into the mask.

> // TODO: Add your control notification handler
> code here
> SetModified();

> }

> void CLCCReliabilityA::OnChangeEdPartheight()
> {
> // TODO: If this is a RICHEDIT control, the
> control will not
> // send this notification unless you override the
> CPropertyPage::OnInitDialog()
> // function and call CRichEditCtrl().SetEventMask()
> // with the ENM_CHANGE flag ORed into the mask.

> // TODO: Add your control notification handler
> code here
> SetModified();

> }

> void CLCCReliabilityA::OnChangeEdMetalheight()
> {
> // TODO: If this is a RICHEDIT control, the
> control will not
> // send this notification unless you override the
> CPropertyPage::OnInitDialog()
> // function and call CRichEditCtrl().SetEventMask()
> // with the ENM_CHANGE flag ORed into the mask.

> // TODO: Add your control notification handler
> code here
> SetModified();

> }

> void CLCCReliabilityA::OnChangeEdStnlength()
> {
> // TODO: If this is a RICHEDIT control, the
> control will not
> // send this notification unless you override the
> CPropertyPage::OnInitDialog()
> // function and call CRichEditCtrl().SetEventMask()
> // with the ENM_CHANGE flag ORed into the mask.

> // TODO: Add your control notification handler
> code here
> SetModified();

> }

> void CLCCReliabilityA::OnChangeEdStnwidth()
> {
> // TODO: If this is a RICHEDIT control, the
> control will not
> // send this notification unless you override the
> CPropertyPage::OnInitDialog()
> // function and call CRichEditCtrl().SetEventMask()
> // with the ENM_CHANGE flag ORed into the mask.

> // TODO: Add your control notification handler
> code here
> SetModified();

> }

> void CLCCReliabilityA::OnChangeEdStnthick()
> {
> // TODO: If this is a RICHEDIT control, the
> control will not
> // send this notification unless you override the
> CPropertyPage::OnInitDialog()
> // function and call CRichEditCtrl().SetEventMask()
> // with the ENM_CHANGE flag ORed into the mask.

> // TODO: Add your control notification handler
> code here
> SetModified();

> }

> void CLCCReliabilityA::OnChangeEdWetheight()
> {
> // TODO: If this is a RICHEDIT control, the
> control will not
> // send this notification unless you override the
> CPropertyPage::OnInitDialog()
> // function and call CRichEditCtrl().SetEventMask()
> // with the ENM_CHANGE flag ORed into the mask.

> // TODO: Add your control notification handler
> code here
> SetModified();

> }

> void CLCCReliabilityA::OnBttnFrmr()
> {
> // TODO: Add your control notification handler
> code here
> UpdateData(TRUE);
> FILE *stream, *streamA;
> char line[256];
> int result;
> CString sParameter;
> CString sComment;
> CString sInputvalue;
> CSldFOpen SolderOpen;
> CString DataFileName, DataFileNameA;

> COleDateTime timeStart, timeEnd;
> COleDateTimeSpan spanElapsed;
> timeStart = COleDateTime::GetCurrentTime();
> SetModified(TRUE);

> }

> void CLCCReliabilityA::OnRadioR()
> {
> // TODO: Add your control notification handler
> code here
> m_nCorR = 0;
> UpdateData(FALSE);
> SetModified(TRUE);

> }

> void CLCCReliabilityA::OnRadioC()
> {
> // TODO: Add your control notification handler
> code here
> m_nCorR = 1;
> UpdateData(FALSE);
> SetModified(TRUE);

> }

> int CLCCReliabilityA::GetChangedNumber()
> {
> return m_nCorR;
> }
> ***********************************************************
> This page needs to get the variable
> **********************************************************
> // LCCForm.cpp : implementation file
> //

> #include "stdafx.h"
> #include "IStarTemp.h"
> #include "LCCForm.h"
> #include "LCCReliabilityA.h"

> #ifdef _DEBUG
> #define new DEBUG_NEW
> #undef THIS_FILE
> static char THIS_FILE[] = __FILE__;

...

read more »



Sun, 11 Sep 2005 21:48:42 GMT  
 How to exchange data between property pages?
I have two pages, one is CLCCReliability and the other is
CLCCForm. Both are derived from CPropertypage. A variable
that is input in page CLCCReliability needs to be read by
page CLCCForm.  I do not understand what you said to move
the GetChangedNumber to the sheet. Where is my sheet?

Quote:
>-----Original Message-----
>    The following casting is wrong.

>    CLCCReliabilityA * pSheet = STATIC_DOWNCAST
(CLCCReliabilityA,
>GetParent());

>    CLCCReliabilityA is not a sheet here. It is a page.

You need to move the
Quote:
>GetChangedNumber() [ and probably an equivalent

SetChangedNumber() ]  to the
Quote:
>Sheet.

>    Hope this helps.

>--
>Cheers
>Check Abdoul [ VC++ MVP ]
>-----------------------------------

>    Your casting is wrong.  You are casting



>> I copied some of the codes here.
>> *************************************************
>> This page takes in the variable m_nCorR.
>> *************************************************
>> // LCCReliabilityA.cpp : implementation file
>> //

>> #include "stdafx.h"
>> #include "IStarTemp.h"
>> #include "LCCReliabilityA.h"

>> #ifdef _DEBUG
>> #define new DEBUG_NEW
>> #undef THIS_FILE
>> static char THIS_FILE[] = __FILE__;
>> #endif

>> ////////////////////////////////////////////////////////
///
>> //////////////////
>> // CLCCReliabilityA property page

>> IMPLEMENT_DYNCREATE(CLCCReliabilityA, CPropertyPage)

>> CLCCReliabilityA::CLCCReliabilityA() : CPropertyPage
>> (CLCCReliabilityA::IDD)
>> {
>> //{{AFX_DATA_INIT(CLCCReliabilityA)
>> m_dInnerSpan = 4.0;
>> m_dJointHeight = 1.5;
>> m_dMetalH = 5.0;
>> m_sPadLength = _T("11.0");
>> m_sPadWidth = _T("12.0");
>> m_sPartHeight = _T("8.0");
>> m_dPartLength = 20.0;
>> m_sPartWidth = _T("10.0");
>> m_sStenLength = _T("8.0");
>> m_sStnThick = _T("12.0");
>> m_sStnWidth = _T("5.0");
>> m_sWetHeight = _T("100");
>> m_nCorR = 0;
>> //}}AFX_DATA_INIT
>> }

>> CLCCReliabilityA::~CLCCReliabilityA()
>> {
>> }

>> void CLCCReliabilityA::DoDataExchange(CDataExchange*
pDX)
>> {
>> CPropertyPage::DoDataExchange(pDX);
>> //{{AFX_DATA_MAP(CLCCReliabilityA)
>> DDX_Text(pDX, IDC_ED_INNERSPAN, m_dInnerSpan);
>> DDX_Text(pDX, IDC_ED_JOINTHEIGHT, m_dJointHeight);
>> DDX_Text(pDX, IDC_ED_METALHEIGHT, m_dMetalH);
>> DDX_Text(pDX, IDC_ED_PADLENGTH, m_sPadLength);
>> DDX_Text(pDX, IDC_ED_PADWIDTH, m_sPadWidth);
>> DDX_Text(pDX, IDC_ED_PARTHEIGHT, m_sPartHeight);
>> DDX_Text(pDX, IDC_ED_PARTLENGTH, m_dPartLength);
>> DDX_Text(pDX, IDC_ED_PARTWIDTH, m_sPartWidth);
>> DDX_Text(pDX, IDC_ED_STNLENGTH, m_sStenLength);
>> DDX_Text(pDX, IDC_ED_STNTHICK, m_sStnThick);
>> DDX_Text(pDX, IDC_ED_STNWIDTH, m_sStnWidth);
>> DDX_Text(pDX, IDC_ED_WETHEIGHT, m_sWetHeight);
>> DDX_Radio(pDX, IDC_RADIO_R, m_nCorR);

>> //}}AFX_DATA_MAP
>> }

>> BEGIN_MESSAGE_MAP(CLCCReliabilityA, CPropertyPage)
>> //{{AFX_MSG_MAP(CLCCReliabilityA)
>> ON_BN_CLICKED(IDC_BTTN_GEOMETRY, OnBttnGeometry)
>> ON_EN_CHANGE(IDC_ED_PADLENGTH, OnChangeEdPadlength)
>> ON_EN_CHANGE(IDC_ED_PADWIDTH, OnChangeEdPadwidth)
>> ON_EN_CHANGE(IDC_ED_INNERSPAN, OnChangeEdInnerspan)
>> ON_EN_CHANGE(IDC_ED_JOINTHEIGHT,
>> OnChangeEdJointheight)
>> ON_EN_CHANGE(IDC_ED_PARTLENGTH,
>> OnChangeEdPartlength)
>> ON_EN_CHANGE(IDC_ED_PARTWIDTH, OnChangeEdPartwidth)
>> ON_EN_CHANGE(IDC_ED_PARTHEIGHT,
>> OnChangeEdPartheight)
>> ON_EN_CHANGE(IDC_ED_METALHEIGHT,
>> OnChangeEdMetalheight)
>> ON_EN_CHANGE(IDC_ED_STNLENGTH, OnChangeEdStnlength)
>> ON_EN_CHANGE(IDC_ED_STNWIDTH, OnChangeEdStnwidth)
>> ON_EN_CHANGE(IDC_ED_STNTHICK, OnChangeEdStnthick)
>> ON_EN_CHANGE(IDC_ED_WETHEIGHT, OnChangeEdWetheight)
>> ON_BN_CLICKED(IDC_BTTN_FRMR, OnBttnFrmr)
>> ON_BN_CLICKED(IDC_RADIO_R, OnRadioR)
>> ON_BN_CLICKED(IDC_RADIO_C, OnRadioC)
>> //}}AFX_MSG_MAP
>> END_MESSAGE_MAP()

>> ////////////////////////////////////////////////////////
///
>> //////////////////
>> // CLCCReliabilityA message handlers

>> void CLCCReliabilityA::OnBttnGeometry()
>> {
>> // TODO: Add your control notification handler
>> code here
>> m_DlgLCCGeometry.DoModal();
>> }

>> void CLCCReliabilityA::OnOK()
>> {
>> // TODO: Add your specialized code here and/or
>> call the base class
>> SetModified(FALSE);

>> CPropertyPage::OnOK();
>> }

>> void CLCCReliabilityA::OnCancel()
>> {
>> // TODO: Add your specialized code here and/or
>> call the base class
>> SetModified(FALSE);

>> CPropertyPage::OnCancel();
>> }

>> void CLCCReliabilityA::OnChangeEdPadlength()
>> {
>> // TODO: If this is a RICHEDIT control, the
>> control will not
>> // send this notification unless you override the
>> CPropertyPage::OnInitDialog()
>> // function and call CRichEditCtrl().SetEventMask()
>> // with the ENM_CHANGE flag ORed into the mask.

>> // TODO: Add your control notification handler
>> code here
>> SetModified();

>> }

>> void CLCCReliabilityA::OnChangeEdPadwidth()
>> {
>> // TODO: If this is a RICHEDIT control, the
>> control will not
>> // send this notification unless you override the
>> CPropertyPage::OnInitDialog()
>> // function and call CRichEditCtrl().SetEventMask()
>> // with the ENM_CHANGE flag ORed into the mask.

>> // TODO: Add your control notification handler
>> code here
>> SetModified();

>> }

>> void CLCCReliabilityA::OnChangeEdInnerspan()
>> {
>> // TODO: If this is a RICHEDIT control, the
>> control will not
>> // send this notification unless you override the
>> CPropertyPage::OnInitDialog()
>> // function and call CRichEditCtrl().SetEventMask()
>> // with the ENM_CHANGE flag ORed into the mask.

>> // TODO: Add your control notification handler
>> code here
>> SetModified();

>> }

>> void CLCCReliabilityA::OnChangeEdJointheight()
>> {
>> // TODO: If this is a RICHEDIT control, the
>> control will not
>> // send this notification unless you override the
>> CPropertyPage::OnInitDialog()
>> // function and call CRichEditCtrl().SetEventMask()
>> // with the ENM_CHANGE flag ORed into the mask.

>> // TODO: Add your control notification handler
>> code here
>> SetModified();

>> }

>> void CLCCReliabilityA::OnChangeEdPartlength()
>> {
>> // TODO: If this is a RICHEDIT control, the
>> control will not
>> // send this notification unless you override the
>> CPropertyPage::OnInitDialog()
>> // function and call CRichEditCtrl().SetEventMask()
>> // with the ENM_CHANGE flag ORed into the mask.

>> // TODO: Add your control notification handler
>> code here
>> SetModified();

>> }

>> void CLCCReliabilityA::OnChangeEdPartwidth()
>> {
>> // TODO: If this is a RICHEDIT control, the
>> control will not
>> // send this notification unless you override the
>> CPropertyPage::OnInitDialog()
>> // function and call CRichEditCtrl().SetEventMask()
>> // with the ENM_CHANGE flag ORed into the mask.

>> // TODO: Add your control notification handler
>> code here
>> SetModified();

>> }

>> void CLCCReliabilityA::OnChangeEdPartheight()
>> {
>> // TODO: If this is a RICHEDIT control, the
>> control will not
>> // send this notification unless you override the
>> CPropertyPage::OnInitDialog()
>> // function and call CRichEditCtrl().SetEventMask()
>> // with the ENM_CHANGE flag ORed into the mask.

>> // TODO: Add your control notification handler
>> code here
>> SetModified();

>> }

>> void CLCCReliabilityA::OnChangeEdMetalheight()
>> {
>> // TODO: If this is a RICHEDIT control, the
>> control will not
>> // send this notification unless you override the
>> CPropertyPage::OnInitDialog()
>> // function and call CRichEditCtrl().SetEventMask()
>> // with the ENM_CHANGE flag ORed into the mask.

>> // TODO: Add your control notification handler
>> code here
>> SetModified();

>> }

>> void CLCCReliabilityA::OnChangeEdStnlength()
>> {
>> // TODO: If this is a RICHEDIT control, the
>> control will not
>> // send this notification unless you override the
>> CPropertyPage::OnInitDialog()
>> // function and call CRichEditCtrl().SetEventMask()
>> // with the ENM_CHANGE flag ORed into the mask.

>> // TODO: Add your control notification handler
>> code here
>> SetModified();

>> }

>> void CLCCReliabilityA::OnChangeEdStnwidth()
>> {
>> // TODO: If this is a RICHEDIT control, the
>> control will not
>> // send this notification unless you override the
>> CPropertyPage::OnInitDialog()
>> // function and call CRichEditCtrl().SetEventMask()
>> // with the ENM_CHANGE flag ORed into the mask.

>> // TODO: Add your control notification handler
>> code here
>> SetModified();

>> }

>> void CLCCReliabilityA::OnChangeEdStnthick()
>> {
>> // TODO: If this is a RICHEDIT control, the
>> control will not
>> // send this notification unless you override the
>> CPropertyPage::OnInitDialog()
>> // function and call CRichEditCtrl().SetEventMask()
>> // with the ENM_CHANGE flag ORed into the mask.

>> // TODO: Add your control notification handler
>> code here
>> SetModified();

>> }

>> void CLCCReliabilityA::OnChangeEdWetheight()
>> {
>> // TODO: If this is a RICHEDIT control, the
>> control will not
>> // send this notification unless you override the
>> CPropertyPage::OnInitDialog()
>> // function and call CRichEditCtrl().SetEventMask()
>> // with the ENM_CHANGE flag ORed into the mask.

>> // TODO: Add your control notification handler
>> code here
>> SetModified();

>> }

>> void CLCCReliabilityA::OnBttnFrmr()
>> {
>> // TODO: Add your control notification handler
>> code here
>> UpdateData(TRUE);
>> FILE *stream, *streamA;
>> char line[256];
>> int result;
>> CString sParameter;
>> CString sComment;
>> CString sInputvalue;
>> CSldFOpen SolderOpen;
>> CString DataFileName, DataFileNameA;

>> COleDateTime timeStart, timeEnd;
>> COleDateTimeSpan spanElapsed;
>> timeStart = COleDateTime::GetCurrentTime();
>> SetModified(TRUE);

>> }

>> void CLCCReliabilityA::OnRadioR()
>> {
>> // TODO: Add your control notification handler
>> code here
>> m_nCorR = 0;

...

read more »



Mon, 12 Sep 2005 15:17:00 GMT  
 How to exchange data between property pages?
Please see yesterday's post under the same topic for
previous discussions.

I have two pages, one is CPageOne and the other is
CPageTwo. Both are derived from CPropertypage. A variable
that is input in page CPageOne needs to be read by
page CPageTwo. I am not doing data exchange between MyView
and the property pages. I would like to know how.

Thank you.



Mon, 12 Sep 2005 15:50:30 GMT  
 How to exchange data between property pages?
    The pages should be embedded onto a sheet. The sheet is the place where
you generally call AddPage(..) to add these pages.

--
Cheers
Check Abdoul [ VC++ MVP ]
-----------------------------------


Quote:
> I have two pages, one is CLCCReliability and the other is
> CLCCForm. Both are derived from CPropertypage. A variable
> that is input in page CLCCReliability needs to be read by
> page CLCCForm.  I do not understand what you said to move
> the GetChangedNumber to the sheet. Where is my sheet?

> >-----Original Message-----
> >    The following casting is wrong.

> >    CLCCReliabilityA * pSheet = STATIC_DOWNCAST
> (CLCCReliabilityA,
> >GetParent());

> >    CLCCReliabilityA is not a sheet here. It is a page.
> You need to move the
> >GetChangedNumber() [ and probably an equivalent
> SetChangedNumber() ]  to the
> >Sheet.

> >    Hope this helps.

> >--
> >Cheers
> >Check Abdoul [ VC++ MVP ]
> >-----------------------------------

> >    Your casting is wrong.  You are casting



> >> I copied some of the codes here.
> >> *************************************************
> >> This page takes in the variable m_nCorR.
> >> *************************************************
> >> // LCCReliabilityA.cpp : implementation file
> >> //

> >> #include "stdafx.h"
> >> #include "IStarTemp.h"
> >> #include "LCCReliabilityA.h"

> >> #ifdef _DEBUG
> >> #define new DEBUG_NEW
> >> #undef THIS_FILE
> >> static char THIS_FILE[] = __FILE__;
> >> #endif

> >> ////////////////////////////////////////////////////////
> ///
> >> //////////////////
> >> // CLCCReliabilityA property page

> >> IMPLEMENT_DYNCREATE(CLCCReliabilityA, CPropertyPage)

> >> CLCCReliabilityA::CLCCReliabilityA() : CPropertyPage
> >> (CLCCReliabilityA::IDD)
> >> {
> >> //{{AFX_DATA_INIT(CLCCReliabilityA)
> >> m_dInnerSpan = 4.0;
> >> m_dJointHeight = 1.5;
> >> m_dMetalH = 5.0;
> >> m_sPadLength = _T("11.0");
> >> m_sPadWidth = _T("12.0");
> >> m_sPartHeight = _T("8.0");
> >> m_dPartLength = 20.0;
> >> m_sPartWidth = _T("10.0");
> >> m_sStenLength = _T("8.0");
> >> m_sStnThick = _T("12.0");
> >> m_sStnWidth = _T("5.0");
> >> m_sWetHeight = _T("100");
> >> m_nCorR = 0;
> >> //}}AFX_DATA_INIT
> >> }

> >> CLCCReliabilityA::~CLCCReliabilityA()
> >> {
> >> }

> >> void CLCCReliabilityA::DoDataExchange(CDataExchange*
> pDX)
> >> {
> >> CPropertyPage::DoDataExchange(pDX);
> >> //{{AFX_DATA_MAP(CLCCReliabilityA)
> >> DDX_Text(pDX, IDC_ED_INNERSPAN, m_dInnerSpan);
> >> DDX_Text(pDX, IDC_ED_JOINTHEIGHT, m_dJointHeight);
> >> DDX_Text(pDX, IDC_ED_METALHEIGHT, m_dMetalH);
> >> DDX_Text(pDX, IDC_ED_PADLENGTH, m_sPadLength);
> >> DDX_Text(pDX, IDC_ED_PADWIDTH, m_sPadWidth);
> >> DDX_Text(pDX, IDC_ED_PARTHEIGHT, m_sPartHeight);
> >> DDX_Text(pDX, IDC_ED_PARTLENGTH, m_dPartLength);
> >> DDX_Text(pDX, IDC_ED_PARTWIDTH, m_sPartWidth);
> >> DDX_Text(pDX, IDC_ED_STNLENGTH, m_sStenLength);
> >> DDX_Text(pDX, IDC_ED_STNTHICK, m_sStnThick);
> >> DDX_Text(pDX, IDC_ED_STNWIDTH, m_sStnWidth);
> >> DDX_Text(pDX, IDC_ED_WETHEIGHT, m_sWetHeight);
> >> DDX_Radio(pDX, IDC_RADIO_R, m_nCorR);

> >> //}}AFX_DATA_MAP
> >> }

> >> BEGIN_MESSAGE_MAP(CLCCReliabilityA, CPropertyPage)
> >> //{{AFX_MSG_MAP(CLCCReliabilityA)
> >> ON_BN_CLICKED(IDC_BTTN_GEOMETRY, OnBttnGeometry)
> >> ON_EN_CHANGE(IDC_ED_PADLENGTH, OnChangeEdPadlength)
> >> ON_EN_CHANGE(IDC_ED_PADWIDTH, OnChangeEdPadwidth)
> >> ON_EN_CHANGE(IDC_ED_INNERSPAN, OnChangeEdInnerspan)
> >> ON_EN_CHANGE(IDC_ED_JOINTHEIGHT,
> >> OnChangeEdJointheight)
> >> ON_EN_CHANGE(IDC_ED_PARTLENGTH,
> >> OnChangeEdPartlength)
> >> ON_EN_CHANGE(IDC_ED_PARTWIDTH, OnChangeEdPartwidth)
> >> ON_EN_CHANGE(IDC_ED_PARTHEIGHT,
> >> OnChangeEdPartheight)
> >> ON_EN_CHANGE(IDC_ED_METALHEIGHT,
> >> OnChangeEdMetalheight)
> >> ON_EN_CHANGE(IDC_ED_STNLENGTH, OnChangeEdStnlength)
> >> ON_EN_CHANGE(IDC_ED_STNWIDTH, OnChangeEdStnwidth)
> >> ON_EN_CHANGE(IDC_ED_STNTHICK, OnChangeEdStnthick)
> >> ON_EN_CHANGE(IDC_ED_WETHEIGHT, OnChangeEdWetheight)
> >> ON_BN_CLICKED(IDC_BTTN_FRMR, OnBttnFrmr)
> >> ON_BN_CLICKED(IDC_RADIO_R, OnRadioR)
> >> ON_BN_CLICKED(IDC_RADIO_C, OnRadioC)
> >> //}}AFX_MSG_MAP
> >> END_MESSAGE_MAP()

> >> ////////////////////////////////////////////////////////
> ///
> >> //////////////////
> >> // CLCCReliabilityA message handlers

> >> void CLCCReliabilityA::OnBttnGeometry()
> >> {
> >> // TODO: Add your control notification handler
> >> code here
> >> m_DlgLCCGeometry.DoModal();
> >> }

> >> void CLCCReliabilityA::OnOK()
> >> {
> >> // TODO: Add your specialized code here and/or
> >> call the base class
> >> SetModified(FALSE);

> >> CPropertyPage::OnOK();
> >> }

> >> void CLCCReliabilityA::OnCancel()
> >> {
> >> // TODO: Add your specialized code here and/or
> >> call the base class
> >> SetModified(FALSE);

> >> CPropertyPage::OnCancel();
> >> }

> >> void CLCCReliabilityA::OnChangeEdPadlength()
> >> {
> >> // TODO: If this is a RICHEDIT control, the
> >> control will not
> >> // send this notification unless you override the
> >> CPropertyPage::OnInitDialog()
> >> // function and call CRichEditCtrl().SetEventMask()
> >> // with the ENM_CHANGE flag ORed into the mask.

> >> // TODO: Add your control notification handler
> >> code here
> >> SetModified();

> >> }

> >> void CLCCReliabilityA::OnChangeEdPadwidth()
> >> {
> >> // TODO: If this is a RICHEDIT control, the
> >> control will not
> >> // send this notification unless you override the
> >> CPropertyPage::OnInitDialog()
> >> // function and call CRichEditCtrl().SetEventMask()
> >> // with the ENM_CHANGE flag ORed into the mask.

> >> // TODO: Add your control notification handler
> >> code here
> >> SetModified();

> >> }

> >> void CLCCReliabilityA::OnChangeEdInnerspan()
> >> {
> >> // TODO: If this is a RICHEDIT control, the
> >> control will not
> >> // send this notification unless you override the
> >> CPropertyPage::OnInitDialog()
> >> // function and call CRichEditCtrl().SetEventMask()
> >> // with the ENM_CHANGE flag ORed into the mask.

> >> // TODO: Add your control notification handler
> >> code here
> >> SetModified();

> >> }

> >> void CLCCReliabilityA::OnChangeEdJointheight()
> >> {
> >> // TODO: If this is a RICHEDIT control, the
> >> control will not
> >> // send this notification unless you override the
> >> CPropertyPage::OnInitDialog()
> >> // function and call CRichEditCtrl().SetEventMask()
> >> // with the ENM_CHANGE flag ORed into the mask.

> >> // TODO: Add your control notification handler
> >> code here
> >> SetModified();

> >> }

> >> void CLCCReliabilityA::OnChangeEdPartlength()
> >> {
> >> // TODO: If this is a RICHEDIT control, the
> >> control will not
> >> // send this notification unless you override the
> >> CPropertyPage::OnInitDialog()
> >> // function and call CRichEditCtrl().SetEventMask()
> >> // with the ENM_CHANGE flag ORed into the mask.

> >> // TODO: Add your control notification handler
> >> code here
> >> SetModified();

> >> }

> >> void CLCCReliabilityA::OnChangeEdPartwidth()
> >> {
> >> // TODO: If this is a RICHEDIT control, the
> >> control will not
> >> // send this notification unless you override the
> >> CPropertyPage::OnInitDialog()
> >> // function and call CRichEditCtrl().SetEventMask()
> >> // with the ENM_CHANGE flag ORed into the mask.

> >> // TODO: Add your control notification handler
> >> code here
> >> SetModified();

> >> }

> >> void CLCCReliabilityA::OnChangeEdPartheight()
> >> {
> >> // TODO: If this is a RICHEDIT control, the
> >> control will not
> >> // send this notification unless you override the
> >> CPropertyPage::OnInitDialog()
> >> // function and call CRichEditCtrl().SetEventMask()
> >> // with the ENM_CHANGE flag ORed into the mask.

> >> // TODO: Add your control notification handler
> >> code here
> >> SetModified();

> >> }

> >> void CLCCReliabilityA::OnChangeEdMetalheight()
> >> {
> >> // TODO: If this is a RICHEDIT control, the
> >> control will not
> >> // send this notification unless you override the
> >> CPropertyPage::OnInitDialog()
> >> // function and call CRichEditCtrl().SetEventMask()
> >> // with the ENM_CHANGE flag ORed into the mask.

> >> // TODO: Add your control notification handler
> >> code here
> >> SetModified();

> >> }

> >> void CLCCReliabilityA::OnChangeEdStnlength()
> >> {
> >> // TODO: If this is a RICHEDIT control, the
> >> control will not
> >> // send this notification unless you override the
> >> CPropertyPage::OnInitDialog()
> >> // function and call CRichEditCtrl().SetEventMask()
> >> // with the ENM_CHANGE flag ORed into the mask.

> >> // TODO: Add your control notification handler
> >> code here
> >> SetModified();

> >> }

> >> void CLCCReliabilityA::OnChangeEdStnwidth()
> >> {
> >> // TODO: If this is a RICHEDIT control, the
> >> control will not
> >> // send this notification unless you override the
> >> CPropertyPage::OnInitDialog()
> >> // function and call CRichEditCtrl().SetEventMask()
> >> // with the ENM_CHANGE flag ORed into the mask.

> >> // TODO: Add your control notification handler
> >> code here
> >> SetModified();

> >> }

> >> void CLCCReliabilityA::OnChangeEdStnthick()
> >> {
> >> // TODO: If this is a RICHEDIT control, the
> >> control will not
> >> // send this notification unless you override the
> >> CPropertyPage::OnInitDialog()
> >> // function and call CRichEditCtrl().SetEventMask()
> >> // with the ENM_CHANGE flag ORed into the mask.

> >> // TODO: Add your control notification handler
> >> code here
> >> SetModified();

> >> }

> >> void CLCCReliabilityA::OnChangeEdWetheight()
> >> {
> >> // TODO: If this is a

...

read more »



Mon, 12 Sep 2005 16:00:33 GMT  
 How to exchange data between property pages?
What if my sheet does not need the value but the second
page does?

Quote:
>-----Original Message-----
>    The pages should be embedded onto a sheet. The sheet
is the place where
>you generally call AddPage(..) to add these pages.

>--
>Cheers
>Check Abdoul [ VC++ MVP ]
>-----------------------------------



>> I have two pages, one is CLCCReliability and the other
is
>> CLCCForm. Both are derived from CPropertypage. A
variable
>> that is input in page CLCCReliability needs to be read
by
>> page CLCCForm.  I do not understand what you said to
move
>> the GetChangedNumber to the sheet. Where is my sheet?

>> >-----Original Message-----
>> >    The following casting is wrong.

>> >    CLCCReliabilityA * pSheet = STATIC_DOWNCAST
>> (CLCCReliabilityA,
>> >GetParent());

>> >    CLCCReliabilityA is not a sheet here. It is a page.
>> You need to move the
>> >GetChangedNumber() [ and probably an equivalent
>> SetChangedNumber() ]  to the
>> >Sheet.

>> >    Hope this helps.

>> >--
>> >Cheers
>> >Check Abdoul [ VC++ MVP ]
>> >-----------------------------------

>> >    Your casting is wrong.  You are casting



>> >> I copied some of the codes here.
>> >> *************************************************
>> >> This page takes in the variable m_nCorR.
>> >> *************************************************
>> >> // LCCReliabilityA.cpp : implementation file
>> >> //

>> >> #include "stdafx.h"
>> >> #include "IStarTemp.h"
>> >> #include "LCCReliabilityA.h"

>> >> #ifdef _DEBUG
>> >> #define new DEBUG_NEW
>> >> #undef THIS_FILE
>> >> static char THIS_FILE[] = __FILE__;
>> >> #endif

>> ////////////////////////////////////////////////////////
>> ///
>> >> //////////////////
>> >> // CLCCReliabilityA property page

>> >> IMPLEMENT_DYNCREATE(CLCCReliabilityA, CPropertyPage)

>> >> CLCCReliabilityA::CLCCReliabilityA() : CPropertyPage
>> >> (CLCCReliabilityA::IDD)
>> >> {
>> >> //{{AFX_DATA_INIT(CLCCReliabilityA)
>> >> m_dInnerSpan = 4.0;
>> >> m_dJointHeight = 1.5;
>> >> m_dMetalH = 5.0;
>> >> m_sPadLength = _T("11.0");
>> >> m_sPadWidth = _T("12.0");
>> >> m_sPartHeight = _T("8.0");
>> >> m_dPartLength = 20.0;
>> >> m_sPartWidth = _T("10.0");
>> >> m_sStenLength = _T("8.0");
>> >> m_sStnThick = _T("12.0");
>> >> m_sStnWidth = _T("5.0");
>> >> m_sWetHeight = _T("100");
>> >> m_nCorR = 0;
>> >> //}}AFX_DATA_INIT
>> >> }

>> >> CLCCReliabilityA::~CLCCReliabilityA()
>> >> {
>> >> }

>> >> void CLCCReliabilityA::DoDataExchange(CDataExchange*
>> pDX)
>> >> {
>> >> CPropertyPage::DoDataExchange(pDX);
>> >> //{{AFX_DATA_MAP(CLCCReliabilityA)
>> >> DDX_Text(pDX, IDC_ED_INNERSPAN, m_dInnerSpan);
>> >> DDX_Text(pDX, IDC_ED_JOINTHEIGHT, m_dJointHeight);
>> >> DDX_Text(pDX, IDC_ED_METALHEIGHT, m_dMetalH);
>> >> DDX_Text(pDX, IDC_ED_PADLENGTH, m_sPadLength);
>> >> DDX_Text(pDX, IDC_ED_PADWIDTH, m_sPadWidth);
>> >> DDX_Text(pDX, IDC_ED_PARTHEIGHT, m_sPartHeight);
>> >> DDX_Text(pDX, IDC_ED_PARTLENGTH, m_dPartLength);
>> >> DDX_Text(pDX, IDC_ED_PARTWIDTH, m_sPartWidth);
>> >> DDX_Text(pDX, IDC_ED_STNLENGTH, m_sStenLength);
>> >> DDX_Text(pDX, IDC_ED_STNTHICK, m_sStnThick);
>> >> DDX_Text(pDX, IDC_ED_STNWIDTH, m_sStnWidth);
>> >> DDX_Text(pDX, IDC_ED_WETHEIGHT, m_sWetHeight);
>> >> DDX_Radio(pDX, IDC_RADIO_R, m_nCorR);

>> >> //}}AFX_DATA_MAP
>> >> }

>> >> BEGIN_MESSAGE_MAP(CLCCReliabilityA, CPropertyPage)
>> >> //{{AFX_MSG_MAP(CLCCReliabilityA)
>> >> ON_BN_CLICKED(IDC_BTTN_GEOMETRY, OnBttnGeometry)
>> >> ON_EN_CHANGE(IDC_ED_PADLENGTH, OnChangeEdPadlength)
>> >> ON_EN_CHANGE(IDC_ED_PADWIDTH, OnChangeEdPadwidth)
>> >> ON_EN_CHANGE(IDC_ED_INNERSPAN, OnChangeEdInnerspan)
>> >> ON_EN_CHANGE(IDC_ED_JOINTHEIGHT,
>> >> OnChangeEdJointheight)
>> >> ON_EN_CHANGE(IDC_ED_PARTLENGTH,
>> >> OnChangeEdPartlength)
>> >> ON_EN_CHANGE(IDC_ED_PARTWIDTH, OnChangeEdPartwidth)
>> >> ON_EN_CHANGE(IDC_ED_PARTHEIGHT,
>> >> OnChangeEdPartheight)
>> >> ON_EN_CHANGE(IDC_ED_METALHEIGHT,
>> >> OnChangeEdMetalheight)
>> >> ON_EN_CHANGE(IDC_ED_STNLENGTH, OnChangeEdStnlength)
>> >> ON_EN_CHANGE(IDC_ED_STNWIDTH, OnChangeEdStnwidth)
>> >> ON_EN_CHANGE(IDC_ED_STNTHICK, OnChangeEdStnthick)
>> >> ON_EN_CHANGE(IDC_ED_WETHEIGHT, OnChangeEdWetheight)
>> >> ON_BN_CLICKED(IDC_BTTN_FRMR, OnBttnFrmr)
>> >> ON_BN_CLICKED(IDC_RADIO_R, OnRadioR)
>> >> ON_BN_CLICKED(IDC_RADIO_C, OnRadioC)
>> >> //}}AFX_MSG_MAP
>> >> END_MESSAGE_MAP()

>> ////////////////////////////////////////////////////////
>> ///
>> >> //////////////////
>> >> // CLCCReliabilityA message handlers

>> >> void CLCCReliabilityA::OnBttnGeometry()
>> >> {
>> >> // TODO: Add your control notification handler
>> >> code here
>> >> m_DlgLCCGeometry.DoModal();
>> >> }

>> >> void CLCCReliabilityA::OnOK()
>> >> {
>> >> // TODO: Add your specialized code here and/or
>> >> call the base class
>> >> SetModified(FALSE);

>> >> CPropertyPage::OnOK();
>> >> }

>> >> void CLCCReliabilityA::OnCancel()
>> >> {
>> >> // TODO: Add your specialized code here and/or
>> >> call the base class
>> >> SetModified(FALSE);

>> >> CPropertyPage::OnCancel();
>> >> }

>> >> void CLCCReliabilityA::OnChangeEdPadlength()
>> >> {
>> >> // TODO: If this is a RICHEDIT control, the
>> >> control will not
>> >> // send this notification unless you override the
>> >> CPropertyPage::OnInitDialog()
>> >> // function and call CRichEditCtrl().SetEventMask()
>> >> // with the ENM_CHANGE flag ORed into the mask.

>> >> // TODO: Add your control notification handler
>> >> code here
>> >> SetModified();

>> >> }

>> >> void CLCCReliabilityA::OnChangeEdPadwidth()
>> >> {
>> >> // TODO: If this is a RICHEDIT control, the
>> >> control will not
>> >> // send this notification unless you override the
>> >> CPropertyPage::OnInitDialog()
>> >> // function and call CRichEditCtrl().SetEventMask()
>> >> // with the ENM_CHANGE flag ORed into the mask.

>> >> // TODO: Add your control notification handler
>> >> code here
>> >> SetModified();

>> >> }

>> >> void CLCCReliabilityA::OnChangeEdInnerspan()
>> >> {
>> >> // TODO: If this is a RICHEDIT control, the
>> >> control will not
>> >> // send this notification unless you override the
>> >> CPropertyPage::OnInitDialog()
>> >> // function and call CRichEditCtrl().SetEventMask()
>> >> // with the ENM_CHANGE flag ORed into the mask.

>> >> // TODO: Add your control notification handler
>> >> code here
>> >> SetModified();

>> >> }

>> >> void CLCCReliabilityA::OnChangeEdJointheight()
>> >> {
>> >> // TODO: If this is a RICHEDIT control, the
>> >> control will not
>> >> // send this notification unless you override the
>> >> CPropertyPage::OnInitDialog()
>> >> // function and call CRichEditCtrl().SetEventMask()
>> >> // with the ENM_CHANGE flag ORed into the mask.

>> >> // TODO: Add your control notification handler
>> >> code here
>> >> SetModified();

>> >> }

>> >> void CLCCReliabilityA::OnChangeEdPartlength()
>> >> {
>> >> // TODO: If this is a RICHEDIT control, the
>> >> control will not
>> >> // send this notification unless you override the
>> >> CPropertyPage::OnInitDialog()
>> >> // function and call CRichEditCtrl().SetEventMask()
>> >> // with the ENM_CHANGE flag ORed into the mask.

>> >> // TODO: Add your control notification handler
>> >> code here
>> >> SetModified();

>> >> }

>> >> void CLCCReliabilityA::OnChangeEdPartwidth()
>> >> {
>> >> // TODO: If this is a RICHEDIT control, the
>> >> control will not
>> >> // send this notification unless you override the
>> >> CPropertyPage::OnInitDialog()
>> >> // function and call CRichEditCtrl().SetEventMask()
>> >> // with the ENM_CHANGE flag ORed into the mask.

>> >> // TODO: Add your control notification handler
>> >> code here
>> >> SetModified();

>> >> }

>> >> void CLCCReliabilityA::OnChangeEdPartheight()
>> >> {
>> >> // TODO: If this is a RICHEDIT control, the
>> >> control will not
>> >> // send this notification unless you override the
>> >> CPropertyPage::OnInitDialog()
>> >> // function and call CRichEditCtrl().SetEventMask()
>> >> // with the ENM_CHANGE flag ORed into the mask.

>> >> // TODO: Add your control notification handler
>> >> code here
>> >> SetModified();

>> >> }

>> >> void CLCCReliabilityA::OnChangeEdMetalheight()
>> >> {
>> >> // TODO: If this is a RICHEDIT control, the
>> >> control will not
>> >> // send this notification unless you override the
>> >> CPropertyPage::OnInitDialog()
>> >> // function and call CRichEditCtrl().SetEventMask()
>> >> // with the ENM_CHANGE flag ORed into the mask.

>> >> // TODO: Add your control notification handler
>> >> code here
>> >> SetModified();

>> >> }

>> >> void CLCCReliabilityA::OnChangeEdStnlength()
>> >> {
>> >> // TODO: If this is a RICHEDIT control, the
>> >> control will not
>> >> // send this notification unless you override the
>> >> CPropertyPage::OnInitDialog()
>> >> // function and call CRichEditCtrl().SetEventMask()
>> >> // with the ENM_CHANGE flag ORed into the mask.

>> >> // TODO: Add your control notification handler
>> >> code here
>> >> SetModified();

>> >> }

>> >> void CLCCReliabilityA::OnChangeEdStnwidth()
>> >> {
>> >> // TODO: If this is a RICHEDIT control, the
>> >> control will not
>> >> // send this notification unless you override the
>> >> CPropertyPage::OnInitDialog()
>> >> // function and call CRichEditCtrl().SetEventMask()
>> >> // with the ENM_CHANGE flag ORed into the mask.

>> >> // TODO: Add your control notification handler
>> >> code here
>> >> SetModified();

>> >> }

>> >> void CLCCReliabilityA::OnChangeEdStnthick()
>> >> {
>> >> // TODO: If this is a RICHEDIT

...

read more »



Mon, 12 Sep 2005 18:43:46 GMT  
 How to exchange data between property pages?
    This is where the SetChangedNumber() function I mentioned earlier will
help.

    Create a variable in the sheet, let us say m_nMyData;
    From Page 1:    Call SetChangedNumber() to set the value of m_nMyData.
    From Page 2:    Call GetChangedNumber() to get the value of m_nMyData.

    Hope this helps.

--
Cheers
Check Abdoul [ VC++ MVP ]
-----------------------------------


Quote:
> What if my sheet does not need the value but the second
> page does?

> >-----Original Message-----
> >    The pages should be embedded onto a sheet. The sheet
> is the place where
> >you generally call AddPage(..) to add these pages.

> >--
> >Cheers
> >Check Abdoul [ VC++ MVP ]
> >-----------------------------------



> >> I have two pages, one is CLCCReliability and the other
> is
> >> CLCCForm. Both are derived from CPropertypage. A
> variable
> >> that is input in page CLCCReliability needs to be read
> by
> >> page CLCCForm.  I do not understand what you said to
> move
> >> the GetChangedNumber to the sheet. Where is my sheet?

> >> >-----Original Message-----
> >> >    The following casting is wrong.

> >> >    CLCCReliabilityA * pSheet = STATIC_DOWNCAST
> >> (CLCCReliabilityA,
> >> >GetParent());

> >> >    CLCCReliabilityA is not a sheet here. It is a page.
> >> You need to move the
> >> >GetChangedNumber() [ and probably an equivalent
> >> SetChangedNumber() ]  to the
> >> >Sheet.

> >> >    Hope this helps.

> >> >--
> >> >Cheers
> >> >Check Abdoul [ VC++ MVP ]
> >> >-----------------------------------

> >> >    Your casting is wrong.  You are casting



> >> >> I copied some of the codes here.
> >> >> *************************************************
> >> >> This page takes in the variable m_nCorR.
> >> >> *************************************************
> >> >> // LCCReliabilityA.cpp : implementation file
> >> >> //

> >> >> #include "stdafx.h"
> >> >> #include "IStarTemp.h"
> >> >> #include "LCCReliabilityA.h"

> >> >> #ifdef _DEBUG
> >> >> #define new DEBUG_NEW
> >> >> #undef THIS_FILE
> >> >> static char THIS_FILE[] = __FILE__;
> >> >> #endif

> >> ////////////////////////////////////////////////////////
> >> ///
> >> >> //////////////////
> >> >> // CLCCReliabilityA property page

> >> >> IMPLEMENT_DYNCREATE(CLCCReliabilityA, CPropertyPage)

> >> >> CLCCReliabilityA::CLCCReliabilityA() : CPropertyPage
> >> >> (CLCCReliabilityA::IDD)
> >> >> {
> >> >> //{{AFX_DATA_INIT(CLCCReliabilityA)
> >> >> m_dInnerSpan = 4.0;
> >> >> m_dJointHeight = 1.5;
> >> >> m_dMetalH = 5.0;
> >> >> m_sPadLength = _T("11.0");
> >> >> m_sPadWidth = _T("12.0");
> >> >> m_sPartHeight = _T("8.0");
> >> >> m_dPartLength = 20.0;
> >> >> m_sPartWidth = _T("10.0");
> >> >> m_sStenLength = _T("8.0");
> >> >> m_sStnThick = _T("12.0");
> >> >> m_sStnWidth = _T("5.0");
> >> >> m_sWetHeight = _T("100");
> >> >> m_nCorR = 0;
> >> >> //}}AFX_DATA_INIT
> >> >> }

> >> >> CLCCReliabilityA::~CLCCReliabilityA()
> >> >> {
> >> >> }

> >> >> void CLCCReliabilityA::DoDataExchange(CDataExchange*
> >> pDX)
> >> >> {
> >> >> CPropertyPage::DoDataExchange(pDX);
> >> >> //{{AFX_DATA_MAP(CLCCReliabilityA)
> >> >> DDX_Text(pDX, IDC_ED_INNERSPAN, m_dInnerSpan);
> >> >> DDX_Text(pDX, IDC_ED_JOINTHEIGHT, m_dJointHeight);
> >> >> DDX_Text(pDX, IDC_ED_METALHEIGHT, m_dMetalH);
> >> >> DDX_Text(pDX, IDC_ED_PADLENGTH, m_sPadLength);
> >> >> DDX_Text(pDX, IDC_ED_PADWIDTH, m_sPadWidth);
> >> >> DDX_Text(pDX, IDC_ED_PARTHEIGHT, m_sPartHeight);
> >> >> DDX_Text(pDX, IDC_ED_PARTLENGTH, m_dPartLength);
> >> >> DDX_Text(pDX, IDC_ED_PARTWIDTH, m_sPartWidth);
> >> >> DDX_Text(pDX, IDC_ED_STNLENGTH, m_sStenLength);
> >> >> DDX_Text(pDX, IDC_ED_STNTHICK, m_sStnThick);
> >> >> DDX_Text(pDX, IDC_ED_STNWIDTH, m_sStnWidth);
> >> >> DDX_Text(pDX, IDC_ED_WETHEIGHT, m_sWetHeight);
> >> >> DDX_Radio(pDX, IDC_RADIO_R, m_nCorR);

> >> >> //}}AFX_DATA_MAP
> >> >> }

> >> >> BEGIN_MESSAGE_MAP(CLCCReliabilityA, CPropertyPage)
> >> >> //{{AFX_MSG_MAP(CLCCReliabilityA)
> >> >> ON_BN_CLICKED(IDC_BTTN_GEOMETRY, OnBttnGeometry)
> >> >> ON_EN_CHANGE(IDC_ED_PADLENGTH, OnChangeEdPadlength)
> >> >> ON_EN_CHANGE(IDC_ED_PADWIDTH, OnChangeEdPadwidth)
> >> >> ON_EN_CHANGE(IDC_ED_INNERSPAN, OnChangeEdInnerspan)
> >> >> ON_EN_CHANGE(IDC_ED_JOINTHEIGHT,
> >> >> OnChangeEdJointheight)
> >> >> ON_EN_CHANGE(IDC_ED_PARTLENGTH,
> >> >> OnChangeEdPartlength)
> >> >> ON_EN_CHANGE(IDC_ED_PARTWIDTH, OnChangeEdPartwidth)
> >> >> ON_EN_CHANGE(IDC_ED_PARTHEIGHT,
> >> >> OnChangeEdPartheight)
> >> >> ON_EN_CHANGE(IDC_ED_METALHEIGHT,
> >> >> OnChangeEdMetalheight)
> >> >> ON_EN_CHANGE(IDC_ED_STNLENGTH, OnChangeEdStnlength)
> >> >> ON_EN_CHANGE(IDC_ED_STNWIDTH, OnChangeEdStnwidth)
> >> >> ON_EN_CHANGE(IDC_ED_STNTHICK, OnChangeEdStnthick)
> >> >> ON_EN_CHANGE(IDC_ED_WETHEIGHT, OnChangeEdWetheight)
> >> >> ON_BN_CLICKED(IDC_BTTN_FRMR, OnBttnFrmr)
> >> >> ON_BN_CLICKED(IDC_RADIO_R, OnRadioR)
> >> >> ON_BN_CLICKED(IDC_RADIO_C, OnRadioC)
> >> >> //}}AFX_MSG_MAP
> >> >> END_MESSAGE_MAP()

> >> ////////////////////////////////////////////////////////
> >> ///
> >> >> //////////////////
> >> >> // CLCCReliabilityA message handlers

> >> >> void CLCCReliabilityA::OnBttnGeometry()
> >> >> {
> >> >> // TODO: Add your control notification handler
> >> >> code here
> >> >> m_DlgLCCGeometry.DoModal();
> >> >> }

> >> >> void CLCCReliabilityA::OnOK()
> >> >> {
> >> >> // TODO: Add your specialized code here and/or
> >> >> call the base class
> >> >> SetModified(FALSE);

> >> >> CPropertyPage::OnOK();
> >> >> }

> >> >> void CLCCReliabilityA::OnCancel()
> >> >> {
> >> >> // TODO: Add your specialized code here and/or
> >> >> call the base class
> >> >> SetModified(FALSE);

> >> >> CPropertyPage::OnCancel();
> >> >> }

> >> >> void CLCCReliabilityA::OnChangeEdPadlength()
> >> >> {
> >> >> // TODO: If this is a RICHEDIT control, the
> >> >> control will not
> >> >> // send this notification unless you override the
> >> >> CPropertyPage::OnInitDialog()
> >> >> // function and call CRichEditCtrl().SetEventMask()
> >> >> // with the ENM_CHANGE flag ORed into the mask.

> >> >> // TODO: Add your control notification handler
> >> >> code here
> >> >> SetModified();

> >> >> }

> >> >> void CLCCReliabilityA::OnChangeEdPadwidth()
> >> >> {
> >> >> // TODO: If this is a RICHEDIT control, the
> >> >> control will not
> >> >> // send this notification unless you override the
> >> >> CPropertyPage::OnInitDialog()
> >> >> // function and call CRichEditCtrl().SetEventMask()
> >> >> // with the ENM_CHANGE flag ORed into the mask.

> >> >> // TODO: Add your control notification handler
> >> >> code here
> >> >> SetModified();

> >> >> }

> >> >> void CLCCReliabilityA::OnChangeEdInnerspan()
> >> >> {
> >> >> // TODO: If this is a RICHEDIT control, the
> >> >> control will not
> >> >> // send this notification unless you override the
> >> >> CPropertyPage::OnInitDialog()
> >> >> // function and call CRichEditCtrl().SetEventMask()
> >> >> // with the ENM_CHANGE flag ORed into the mask.

> >> >> // TODO: Add your control notification handler
> >> >> code here
> >> >> SetModified();

> >> >> }

> >> >> void CLCCReliabilityA::OnChangeEdJointheight()
> >> >> {
> >> >> // TODO: If this is a RICHEDIT control, the
> >> >> control will not
> >> >> // send this notification unless you override the
> >> >> CPropertyPage::OnInitDialog()
> >> >> // function and call CRichEditCtrl().SetEventMask()
> >> >> // with the ENM_CHANGE flag ORed into the mask.

> >> >> // TODO: Add your control notification handler
> >> >> code here
> >> >> SetModified();

> >> >> }

> >> >> void CLCCReliabilityA::OnChangeEdPartlength()
> >> >> {
> >> >> // TODO: If this is a RICHEDIT control, the
> >> >> control will not
> >> >> // send this notification unless you override the
> >> >> CPropertyPage::OnInitDialog()
> >> >> // function and call CRichEditCtrl().SetEventMask()
> >> >> // with the ENM_CHANGE flag ORed into the mask.

> >> >> // TODO: Add your control notification handler
> >> >> code here
> >> >> SetModified();

> >> >> }

> >> >> void CLCCReliabilityA::OnChangeEdPartwidth()
> >> >> {
> >> >> // TODO: If this is a RICHEDIT control, the
> >> >> control will not
> >> >> // send this notification unless you override the
> >> >> CPropertyPage::OnInitDialog()
> >> >> // function and call CRichEditCtrl().SetEventMask()
> >> >> // with the ENM_CHANGE flag ORed into the mask.

> >> >> // TODO: Add your control notification handler
> >> >> code here
> >> >> SetModified();

> >> >> }

> >> >> void CLCCReliabilityA::OnChangeEdPartheight()
> >> >> {
> >> >> // TODO: If this is a RICHEDIT control, the
> >> >> control will not
> >> >> // send this notification unless you override the
> >> >> CPropertyPage::OnInitDialog()
> >> >> // function and call CRichEditCtrl().SetEventMask()
> >> >> // with the ENM_CHANGE flag ORed into the mask.

> >> >> // TODO: Add your control notification handler
> >> >> code here
> >> >> SetModified();

> >> >> }

> >> >> void CLCCReliabilityA::OnChangeEdMetalheight()
> >> >> {
> >> >> // TODO: If this is a RICHEDIT control, the
> >> >> control will not
> >> >> // send this notification unless you override the
> >> >> CPropertyPage::OnInitDialog()
> >> >> // function and call CRichEditCtrl().SetEventMask()
> >> >> // with the ENM_CHANGE flag ORed into the mask.

> >> >> // TODO: Add your control

...

read more »



Mon, 12 Sep 2005 18:59:18 GMT  
 How to exchange data between property pages?
I really appreciated your help.
I am not a software engineer. I am new in this field.

I do not know how to access the sheet from my pages. I
generated the sheet in MyView class. I do not know how to
call SetChangedNumber() in MyView class from pages.

I am sorry for too many questions.
Ann

Quote:
>-----Original Message-----
>    This is where the SetChangedNumber() function I

mentioned earlier will
Quote:
>help.

>    Create a variable in the sheet, let us say m_nMyData;
>    From Page 1:    Call SetChangedNumber() to set the
value of m_nMyData.
>    From Page 2:    Call GetChangedNumber() to get the
value of m_nMyData.

>    Hope this helps.

>--
>Cheers
>Check Abdoul [ VC++ MVP ]
>-----------------------------------



>> What if my sheet does not need the value but the second
>> page does?

>> >-----Original Message-----
>> >    The pages should be embedded onto a sheet. The
sheet
>> is the place where
>> >you generally call AddPage(..) to add these pages.

>> >--
>> >Cheers
>> >Check Abdoul [ VC++ MVP ]
>> >-----------------------------------



>> >> I have two pages, one is CLCCReliability and the
other
>> is
>> >> CLCCForm. Both are derived from CPropertypage. A
>> variable
>> >> that is input in page CLCCReliability needs to be
read
>> by
>> >> page CLCCForm.  I do not understand what you said to
>> move
>> >> the GetChangedNumber to the sheet. Where is my sheet?

>> >> >-----Original Message-----
>> >> >    The following casting is wrong.

>> >> >    CLCCReliabilityA * pSheet = STATIC_DOWNCAST
>> >> (CLCCReliabilityA,
>> >> >GetParent());

>> >> >    CLCCReliabilityA is not a sheet here. It is a
page.
>> >> You need to move the
>> >> >GetChangedNumber() [ and probably an equivalent
>> >> SetChangedNumber() ]  to the
>> >> >Sheet.

>> >> >    Hope this helps.

>> >> >--
>> >> >Cheers
>> >> >Check Abdoul [ VC++ MVP ]
>> >> >-----------------------------------

>> >> >    Your casting is wrong.  You are casting



>> >> >> I copied some of the codes here.
>> >> >> *************************************************
>> >> >> This page takes in the variable m_nCorR.
>> >> >> *************************************************
>> >> >> // LCCReliabilityA.cpp : implementation file
>> >> >> //

>> >> >> #include "stdafx.h"
>> >> >> #include "IStarTemp.h"
>> >> >> #include "LCCReliabilityA.h"

>> >> >> #ifdef _DEBUG
>> >> >> #define new DEBUG_NEW
>> >> >> #undef THIS_FILE
>> >> >> static char THIS_FILE[] = __FILE__;
>> >> >> #endif

>> ////////////////////////////////////////////////////////
>> >> ///
>> >> >> //////////////////
>> >> >> // CLCCReliabilityA property page

>> >> >> IMPLEMENT_DYNCREATE(CLCCReliabilityA,
CPropertyPage)

>> >> >> CLCCReliabilityA::CLCCReliabilityA() :
CPropertyPage
>> >> >> (CLCCReliabilityA::IDD)
>> >> >> {
>> >> >> //{{AFX_DATA_INIT(CLCCReliabilityA)
>> >> >> m_dInnerSpan = 4.0;
>> >> >> m_dJointHeight = 1.5;
>> >> >> m_dMetalH = 5.0;
>> >> >> m_sPadLength = _T("11.0");
>> >> >> m_sPadWidth = _T("12.0");
>> >> >> m_sPartHeight = _T("8.0");
>> >> >> m_dPartLength = 20.0;
>> >> >> m_sPartWidth = _T("10.0");
>> >> >> m_sStenLength = _T("8.0");
>> >> >> m_sStnThick = _T("12.0");
>> >> >> m_sStnWidth = _T("5.0");
>> >> >> m_sWetHeight = _T("100");
>> >> >> m_nCorR = 0;
>> >> >> //}}AFX_DATA_INIT
>> >> >> }

>> >> >> CLCCReliabilityA::~CLCCReliabilityA()
>> >> >> {
>> >> >> }

>> >> >> void CLCCReliabilityA::DoDataExchange
(CDataExchange*
>> >> pDX)
>> >> >> {
>> >> >> CPropertyPage::DoDataExchange(pDX);
>> >> >> //{{AFX_DATA_MAP(CLCCReliabilityA)
>> >> >> DDX_Text(pDX, IDC_ED_INNERSPAN, m_dInnerSpan);
>> >> >> DDX_Text(pDX, IDC_ED_JOINTHEIGHT, m_dJointHeight);
>> >> >> DDX_Text(pDX, IDC_ED_METALHEIGHT, m_dMetalH);
>> >> >> DDX_Text(pDX, IDC_ED_PADLENGTH, m_sPadLength);
>> >> >> DDX_Text(pDX, IDC_ED_PADWIDTH, m_sPadWidth);
>> >> >> DDX_Text(pDX, IDC_ED_PARTHEIGHT, m_sPartHeight);
>> >> >> DDX_Text(pDX, IDC_ED_PARTLENGTH, m_dPartLength);
>> >> >> DDX_Text(pDX, IDC_ED_PARTWIDTH, m_sPartWidth);
>> >> >> DDX_Text(pDX, IDC_ED_STNLENGTH, m_sStenLength);
>> >> >> DDX_Text(pDX, IDC_ED_STNTHICK, m_sStnThick);
>> >> >> DDX_Text(pDX, IDC_ED_STNWIDTH, m_sStnWidth);
>> >> >> DDX_Text(pDX, IDC_ED_WETHEIGHT, m_sWetHeight);
>> >> >> DDX_Radio(pDX, IDC_RADIO_R, m_nCorR);

>> >> >> //}}AFX_DATA_MAP
>> >> >> }

>> >> >> BEGIN_MESSAGE_MAP(CLCCReliabilityA, CPropertyPage)
>> >> >> //{{AFX_MSG_MAP(CLCCReliabilityA)
>> >> >> ON_BN_CLICKED(IDC_BTTN_GEOMETRY, OnBttnGeometry)
>> >> >> ON_EN_CHANGE(IDC_ED_PADLENGTH,

OnChangeEdPadlength)
Quote:
>> >> >> ON_EN_CHANGE(IDC_ED_PADWIDTH, OnChangeEdPadwidth)
>> >> >> ON_EN_CHANGE(IDC_ED_INNERSPAN,

OnChangeEdInnerspan)
Quote:
>> >> >> ON_EN_CHANGE(IDC_ED_JOINTHEIGHT,
>> >> >> OnChangeEdJointheight)
>> >> >> ON_EN_CHANGE(IDC_ED_PARTLENGTH,
>> >> >> OnChangeEdPartlength)
>> >> >> ON_EN_CHANGE(IDC_ED_PARTWIDTH,

OnChangeEdPartwidth)
Quote:
>> >> >> ON_EN_CHANGE(IDC_ED_PARTHEIGHT,
>> >> >> OnChangeEdPartheight)
>> >> >> ON_EN_CHANGE(IDC_ED_METALHEIGHT,
>> >> >> OnChangeEdMetalheight)
>> >> >> ON_EN_CHANGE(IDC_ED_STNLENGTH,

OnChangeEdStnlength)
Quote:
>> >> >> ON_EN_CHANGE(IDC_ED_STNWIDTH, OnChangeEdStnwidth)
>> >> >> ON_EN_CHANGE(IDC_ED_STNTHICK, OnChangeEdStnthick)
>> >> >> ON_EN_CHANGE(IDC_ED_WETHEIGHT,

OnChangeEdWetheight)

- Show quoted text -

Quote:
>> >> >> ON_BN_CLICKED(IDC_BTTN_FRMR, OnBttnFrmr)
>> >> >> ON_BN_CLICKED(IDC_RADIO_R, OnRadioR)
>> >> >> ON_BN_CLICKED(IDC_RADIO_C, OnRadioC)
>> >> >> //}}AFX_MSG_MAP
>> >> >> END_MESSAGE_MAP()

>> ////////////////////////////////////////////////////////
>> >> ///
>> >> >> //////////////////
>> >> >> // CLCCReliabilityA message handlers

>> >> >> void CLCCReliabilityA::OnBttnGeometry()
>> >> >> {
>> >> >> // TODO: Add your control notification handler
>> >> >> code here
>> >> >> m_DlgLCCGeometry.DoModal();
>> >> >> }

>> >> >> void CLCCReliabilityA::OnOK()
>> >> >> {
>> >> >> // TODO: Add your specialized code here and/or
>> >> >> call the base class
>> >> >> SetModified(FALSE);

>> >> >> CPropertyPage::OnOK();
>> >> >> }

>> >> >> void CLCCReliabilityA::OnCancel()
>> >> >> {
>> >> >> // TODO: Add your specialized code here and/or
>> >> >> call the base class
>> >> >> SetModified(FALSE);

>> >> >> CPropertyPage::OnCancel();
>> >> >> }

>> >> >> void CLCCReliabilityA::OnChangeEdPadlength()
>> >> >> {
>> >> >> // TODO: If this is a RICHEDIT control, the
>> >> >> control will not
>> >> >> // send this notification unless you override the
>> >> >> CPropertyPage::OnInitDialog()
>> >> >> // function and call CRichEditCtrl().SetEventMask
()
>> >> >> // with the ENM_CHANGE flag ORed into the mask.

>> >> >> // TODO: Add your control notification handler
>> >> >> code here
>> >> >> SetModified();

>> >> >> }

>> >> >> void CLCCReliabilityA::OnChangeEdPadwidth()
>> >> >> {
>> >> >> // TODO: If this is a RICHEDIT control, the
>> >> >> control will not
>> >> >> // send this notification unless you override the
>> >> >> CPropertyPage::OnInitDialog()
>> >> >> // function and call CRichEditCtrl().SetEventMask
()
>> >> >> // with the ENM_CHANGE flag ORed into the mask.

>> >> >> // TODO: Add your control notification handler
>> >> >> code here
>> >> >> SetModified();

>> >> >> }

>> >> >> void CLCCReliabilityA::OnChangeEdInnerspan()
>> >> >> {
>> >> >> // TODO: If this is a RICHEDIT control, the
>> >> >> control will not
>> >> >> // send this notification unless you override the
>> >> >> CPropertyPage::OnInitDialog()
>> >> >> // function and call CRichEditCtrl().SetEventMask
()
>> >> >> // with the ENM_CHANGE flag ORed into the mask.

>> >> >> // TODO: Add your control notification handler
>> >> >> code here
>> >> >> SetModified();

>> >> >> }

>> >> >> void CLCCReliabilityA::OnChangeEdJointheight()
>> >> >> {
>> >> >> // TODO: If this is a RICHEDIT control, the
>> >> >> control will not
>> >> >> // send this notification unless you override the
>> >> >> CPropertyPage::OnInitDialog()
>> >> >> // function and call CRichEditCtrl().SetEventMask
()
>> >> >> // with the ENM_CHANGE flag ORed into the mask.

>> >> >> // TODO: Add your control notification handler
>> >> >> code here
>> >> >> SetModified();

>> >> >> }

>> >> >> void CLCCReliabilityA::OnChangeEdPartlength()
>> >> >> {
>> >> >> // TODO: If this is a RICHEDIT control, the
>> >> >> control will not
>> >> >> // send this notification unless you override the
>> >> >> CPropertyPage::OnInitDialog()
>> >> >> // function and call CRichEditCtrl().SetEventMask
()
>> >> >> // with the ENM_CHANGE flag ORed into the mask.

>> >> >> // TODO: Add your control notification handler
>> >> >> code here
>> >> >> SetModified();

>> >> >> }

>> >> >> void CLCCReliabilityA::OnChangeEdPartwidth()
>> >> >> {
>> >> >> // TODO: If this is a RICHEDIT control, the
>> >> >> control will not
>> >> >> // send this notification unless you override the
>> >> >> CPropertyPage::OnInitDialog()
>> >> >> // function and call CRichEditCtrl().SetEventMask
()
>> >> >> // with the ENM_CHANGE flag ORed into the mask.

>> >> >> // TODO: Add your control notification handler
>> >> >> code here
>> >> >> SetModified();

>> >> >> }

>> >> >> void CLCCReliabilityA::OnChangeEdPartheight()
>> >> >> {
>> >> >> // TODO: If this is a RICHEDIT control, the
>> >> >> control will not
>> >> >> // send this notification unless you override the
>> >> >> CPropertyPage::OnInitDialog()
>> >> >> //

...

read more »



Mon, 12 Sep 2005 19:16:34 GMT  
 How to exchange data between property pages?
Hi Ann,

        See if the following links helps you

            http://www.functionx.com/visualc/propsheet/propsheet1.htm
            http://www.functionx.com/visualc/propsheet/propsheet2.htm

--
Cheers
Check Abdoul [ VC++ MVP ]
-----------------------------------


Quote:
> I really appreciated your help.
> I am not a software engineer. I am new in this field.

> I do not know how to access the sheet from my pages. I
> generated the sheet in MyView class. I do not know how to
> call SetChangedNumber() in MyView class from pages.

> I am sorry for too many questions.
> Ann
> >-----Original Message-----
> >    This is where the SetChangedNumber() function I
> mentioned earlier will
> >help.

> >    Create a variable in the sheet, let us say m_nMyData;
> >    From Page 1:    Call SetChangedNumber() to set the
> value of m_nMyData.
> >    From Page 2:    Call GetChangedNumber() to get the
> value of m_nMyData.

> >    Hope this helps.

> >--
> >Cheers
> >Check Abdoul [ VC++ MVP ]
> >-----------------------------------



> >> What if my sheet does not need the value but the second
> >> page does?

> >> >-----Original Message-----
> >> >    The pages should be embedded onto a sheet. The
> sheet
> >> is the place where
> >> >you generally call AddPage(..) to add these pages.

> >> >--
> >> >Cheers
> >> >Check Abdoul [ VC++ MVP ]
> >> >-----------------------------------



> >> >> I have two pages, one is CLCCReliability and the
> other
> >> is
> >> >> CLCCForm. Both are derived from CPropertypage. A
> >> variable
> >> >> that is input in page CLCCReliability needs to be
> read
> >> by
> >> >> page CLCCForm.  I do not understand what you said to
> >> move
> >> >> the GetChangedNumber to the sheet. Where is my sheet?

> >> >> >-----Original Message-----
> >> >> >    The following casting is wrong.

> >> >> >    CLCCReliabilityA * pSheet = STATIC_DOWNCAST
> >> >> (CLCCReliabilityA,
> >> >> >GetParent());

> >> >> >    CLCCReliabilityA is not a sheet here. It is a
> page.
> >> >> You need to move the
> >> >> >GetChangedNumber() [ and probably an equivalent
> >> >> SetChangedNumber() ]  to the
> >> >> >Sheet.

> >> >> >    Hope this helps.

> >> >> >--
> >> >> >Cheers
> >> >> >Check Abdoul [ VC++ MVP ]
> >> >> >-----------------------------------

> >> >> >    Your casting is wrong.  You are casting



> >> >> >> I copied some of the codes here.
> >> >> >> *************************************************
> >> >> >> This page takes in the variable m_nCorR.
> >> >> >> *************************************************
> >> >> >> // LCCReliabilityA.cpp : implementation file
> >> >> >> //

> >> >> >> #include "stdafx.h"
> >> >> >> #include "IStarTemp.h"
> >> >> >> #include "LCCReliabilityA.h"

> >> >> >> #ifdef _DEBUG
> >> >> >> #define new DEBUG_NEW
> >> >> >> #undef THIS_FILE
> >> >> >> static char THIS_FILE[] = __FILE__;
> >> >> >> #endif

> >> ////////////////////////////////////////////////////////
> >> >> ///
> >> >> >> //////////////////
> >> >> >> // CLCCReliabilityA property page

> >> >> >> IMPLEMENT_DYNCREATE(CLCCReliabilityA,
> CPropertyPage)

> >> >> >> CLCCReliabilityA::CLCCReliabilityA() :
> CPropertyPage
> >> >> >> (CLCCReliabilityA::IDD)
> >> >> >> {
> >> >> >> //{{AFX_DATA_INIT(CLCCReliabilityA)
> >> >> >> m_dInnerSpan = 4.0;
> >> >> >> m_dJointHeight = 1.5;
> >> >> >> m_dMetalH = 5.0;
> >> >> >> m_sPadLength = _T("11.0");
> >> >> >> m_sPadWidth = _T("12.0");
> >> >> >> m_sPartHeight = _T("8.0");
> >> >> >> m_dPartLength = 20.0;
> >> >> >> m_sPartWidth = _T("10.0");
> >> >> >> m_sStenLength = _T("8.0");
> >> >> >> m_sStnThick = _T("12.0");
> >> >> >> m_sStnWidth = _T("5.0");
> >> >> >> m_sWetHeight = _T("100");
> >> >> >> m_nCorR = 0;
> >> >> >> //}}AFX_DATA_INIT
> >> >> >> }

> >> >> >> CLCCReliabilityA::~CLCCReliabilityA()
> >> >> >> {
> >> >> >> }

> >> >> >> void CLCCReliabilityA::DoDataExchange
> (CDataExchange*
> >> >> pDX)
> >> >> >> {
> >> >> >> CPropertyPage::DoDataExchange(pDX);
> >> >> >> //{{AFX_DATA_MAP(CLCCReliabilityA)
> >> >> >> DDX_Text(pDX, IDC_ED_INNERSPAN, m_dInnerSpan);
> >> >> >> DDX_Text(pDX, IDC_ED_JOINTHEIGHT, m_dJointHeight);
> >> >> >> DDX_Text(pDX, IDC_ED_METALHEIGHT, m_dMetalH);
> >> >> >> DDX_Text(pDX, IDC_ED_PADLENGTH, m_sPadLength);
> >> >> >> DDX_Text(pDX, IDC_ED_PADWIDTH, m_sPadWidth);
> >> >> >> DDX_Text(pDX, IDC_ED_PARTHEIGHT, m_sPartHeight);
> >> >> >> DDX_Text(pDX, IDC_ED_PARTLENGTH, m_dPartLength);
> >> >> >> DDX_Text(pDX, IDC_ED_PARTWIDTH, m_sPartWidth);
> >> >> >> DDX_Text(pDX, IDC_ED_STNLENGTH, m_sStenLength);
> >> >> >> DDX_Text(pDX, IDC_ED_STNTHICK, m_sStnThick);
> >> >> >> DDX_Text(pDX, IDC_ED_STNWIDTH, m_sStnWidth);
> >> >> >> DDX_Text(pDX, IDC_ED_WETHEIGHT, m_sWetHeight);
> >> >> >> DDX_Radio(pDX, IDC_RADIO_R, m_nCorR);

> >> >> >> //}}AFX_DATA_MAP
> >> >> >> }

> >> >> >> BEGIN_MESSAGE_MAP(CLCCReliabilityA, CPropertyPage)
> >> >> >> //{{AFX_MSG_MAP(CLCCReliabilityA)
> >> >> >> ON_BN_CLICKED(IDC_BTTN_GEOMETRY, OnBttnGeometry)
> >> >> >> ON_EN_CHANGE(IDC_ED_PADLENGTH,
> OnChangeEdPadlength)
> >> >> >> ON_EN_CHANGE(IDC_ED_PADWIDTH, OnChangeEdPadwidth)
> >> >> >> ON_EN_CHANGE(IDC_ED_INNERSPAN,
> OnChangeEdInnerspan)
> >> >> >> ON_EN_CHANGE(IDC_ED_JOINTHEIGHT,
> >> >> >> OnChangeEdJointheight)
> >> >> >> ON_EN_CHANGE(IDC_ED_PARTLENGTH,
> >> >> >> OnChangeEdPartlength)
> >> >> >> ON_EN_CHANGE(IDC_ED_PARTWIDTH,
> OnChangeEdPartwidth)
> >> >> >> ON_EN_CHANGE(IDC_ED_PARTHEIGHT,
> >> >> >> OnChangeEdPartheight)
> >> >> >> ON_EN_CHANGE(IDC_ED_METALHEIGHT,
> >> >> >> OnChangeEdMetalheight)
> >> >> >> ON_EN_CHANGE(IDC_ED_STNLENGTH,
> OnChangeEdStnlength)
> >> >> >> ON_EN_CHANGE(IDC_ED_STNWIDTH, OnChangeEdStnwidth)
> >> >> >> ON_EN_CHANGE(IDC_ED_STNTHICK, OnChangeEdStnthick)
> >> >> >> ON_EN_CHANGE(IDC_ED_WETHEIGHT,
> OnChangeEdWetheight)
> >> >> >> ON_BN_CLICKED(IDC_BTTN_FRMR, OnBttnFrmr)
> >> >> >> ON_BN_CLICKED(IDC_RADIO_R, OnRadioR)
> >> >> >> ON_BN_CLICKED(IDC_RADIO_C, OnRadioC)
> >> >> >> //}}AFX_MSG_MAP
> >> >> >> END_MESSAGE_MAP()

> >> ////////////////////////////////////////////////////////
> >> >> ///
> >> >> >> //////////////////
> >> >> >> // CLCCReliabilityA message handlers

> >> >> >> void CLCCReliabilityA::OnBttnGeometry()
> >> >> >> {
> >> >> >> // TODO: Add your control notification handler
> >> >> >> code here
> >> >> >> m_DlgLCCGeometry.DoModal();
> >> >> >> }

> >> >> >> void CLCCReliabilityA::OnOK()
> >> >> >> {
> >> >> >> // TODO: Add your specialized code here and/or
> >> >> >> call the base class
> >> >> >> SetModified(FALSE);

> >> >> >> CPropertyPage::OnOK();
> >> >> >> }

> >> >> >> void CLCCReliabilityA::OnCancel()
> >> >> >> {
> >> >> >> // TODO: Add your specialized code here and/or
> >> >> >> call the base class
> >> >> >> SetModified(FALSE);

> >> >> >> CPropertyPage::OnCancel();
> >> >> >> }

> >> >> >> void CLCCReliabilityA::OnChangeEdPadlength()
> >> >> >> {
> >> >> >> // TODO: If this is a RICHEDIT control, the
> >> >> >> control will not
> >> >> >> // send this notification unless you override the
> >> >> >> CPropertyPage::OnInitDialog()
> >> >> >> // function and call CRichEditCtrl().SetEventMask
> ()
> >> >> >> // with the ENM_CHANGE flag ORed into the mask.

> >> >> >> // TODO: Add your control notification handler
> >> >> >> code here
> >> >> >> SetModified();

> >> >> >> }

> >> >> >> void CLCCReliabilityA::OnChangeEdPadwidth()
> >> >> >> {
> >> >> >> // TODO: If this is a RICHEDIT control, the
> >> >> >> control will not
> >> >> >> // send this notification unless you override the
> >> >> >> CPropertyPage::OnInitDialog()
> >> >> >> // function and call CRichEditCtrl().SetEventMask
> ()
> >> >> >> // with the ENM_CHANGE flag ORed into the mask.

> >> >> >> // TODO: Add your control notification handler
> >> >> >> code here
> >> >> >> SetModified();

> >> >> >> }

> >> >> >> void CLCCReliabilityA::OnChangeEdInnerspan()
> >> >> >> {
> >> >> >> // TODO: If this is a RICHEDIT control, the
> >> >> >> control will not
> >> >> >> // send this notification unless you override the
> >> >> >> CPropertyPage::OnInitDialog()
> >> >> >> // function and call CRichEditCtrl().SetEventMask
> ()
> >> >> >> // with the ENM_CHANGE flag ORed into the mask.

> >> >> >> // TODO: Add your control notification handler
> >> >> >> code here
> >> >> >> SetModified();

> >> >> >> }

> >> >> >> void CLCCReliabilityA::OnChangeEdJointheight()
> >> >> >> {
> >> >> >> // TODO: If this is a RICHEDIT control, the
> >> >> >> control will not
> >> >> >> // send this notification unless you override the
> >> >> >> CPropertyPage::OnInitDialog()
> >> >> >> // function and call CRichEditCtrl().SetEventMask
> ()
> >> >> >> // with the ENM_CHANGE flag ORed into the mask.

> >> >> >> // TODO: Add your control notification handler
> >> >> >> code here
> >> >> >> SetModified();

> >> >> >> }

> >> >> >> void CLCCReliabilityA::OnChangeEdPartlength()
> >> >> >> {
> >> >> >> // TODO: If this is a RICHEDIT control, the
> >> >> >> control will not
> >> >> >> // send this notification unless you override the
> >> >> >> CPropertyPage::OnInitDialog()
> >> >> >> // function and call CRichEditCtrl().SetEventMask
> ()

...

read more »



Mon, 12 Sep 2005 20:20:00 GMT  
 How to exchange data between property pages?
I'm not sure if you solved this yet, but you can use GetParent() on the
second page, and get the first page variable you want. Something like:

((CPropPage1*)((CPropertySheet*)GetParent())->GetPage(0)).varname

This is VERY bad coding from what I've read on this newsgroup. A better
way would be to send a message to the parent window, and the parent
window would get the variable, either through sending a message to the
other property window, or by accessing the member directly.

-russell

Quote:

> Please see yesterday's post under the same topic for
> previous discussions.

> I have two pages, one is CPageOne and the other is
> CPageTwo. Both are derived from CPropertypage. A variable
> that is input in page CPageOne needs to be read by
> page CPageTwo. I am not doing data exchange between MyView
> and the property pages. I would like to know how.

> Thank you.



Fri, 16 Sep 2005 04:00:23 GMT  
 
 [ 15 post ] 

 Relevant Pages 

1. Property Sheet : Exchange data between property pages

2. Exchange data between property pages

3. Exchanging data between property pages

4. Exchanging the data of dynamic array properties in a COleProperyPage of an ActiveX control

5. MFC data exchange and property sheets

6. Property Pages in a Property Page

7. How pass data to property page (ATL)

8. Shell Extension Property Page data?

9. Transferring Data between Property Pages

10. Displaying DAO data in a property page

11. CSpinButtonCtrl loses data on Property Page

12. Get control data in the property page

 

 
Powered by phpBB® Forum Software