CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Guest

    CPropertySheet wizard

    What is the best way to pass information from on page of a wizard property sheet to the next page(s).

    cheers
    A


  2. #2
    Join Date
    May 1999
    Posts
    116

    Re: CPropertySheet wizard

    The way I use is:
    o Derive a class from CPropertySheet
    o Use this class to store/manage data
    o Property pages in the wizard can call GetParent() to get access to this class

    Hope this works 4 u.



  3. #3
    Guest

    Re: CPropertySheet wizard

    Brian:Would you have any sample code of how you call this information from the derived class?

    Cheers
    A


  4. #4
    Join Date
    May 1999
    Posts
    116

    Re: CPropertySheet wizard

    In the CPropertyPage derived class:

    CMyPropPage:oStuff()
    {
    CMyPropSheet *pPropSheet = (CMyPropSheet *)GetParent();
    if ( pPropSheet )
    {
    int nVal = pPropSheet->m_nVal;
    }
    }




  5. #5
    Guest

    Re: CPropertySheet wizard

    B: sorry for being a pain:
    How did you save the info to the derived class, as this is giving me trouble

    thanks again


  6. #6
    Join Date
    May 1999
    Posts
    116

    Re: CPropertySheet wizard

    In one page you write the data to the PropSheet class, and in the next page you read it back.


    CMyPropPage1::SaveStuff()
    {
    CMyPropSheet *pPropSheet = (CMyPropSheet *)GetParent();
    if ( pPropSheet )
    {
    pPropSheet->m_nVal = nVal;
    }
    }


    CMyPropPage2::ReadStuff()
    {
    CMyPropSheet *pPropSheet = (CMyPropSheet *)GetParent();
    if ( pPropSheet )
    {
    nVal = pPropSheet->m_nVal;
    }
    }





Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured