Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » How to access the Control Values from one CPropertyPage to Another Property Page. Collapse All
Subject Author Date
uday kiran Apr 18, 2006 - 3:33 AM

hi all,

i have theree property Pages added to a Property Sheet. I want to Access the First Property Sheet Control Values (Combo Box Items) in the Second Property Page. How can do for this to access the First Property Sheet ComboBox values in the Second Property Page.

I am sending a snipped of Code.

///
CPropertySheet dlg(_T("Hellow"), this, 0);
    one a;
    two b;
    three c;
    dlg.AddPage(&a);
    dlg.AddPage(&b);
    dlg.AddPage(&c);
    dlg.SetWizardMode();
    dlg.DoModal();
//===========================================

Please let me know how to acces the control Values from other Property Page.

thanks,
uday.

Technical Support Apr 21, 2006 - 7:40 AM

The problem is how to retrieve a valid pointer to the first page from the second page. You can use the GetParent() method to get the pointer to the sheet class and then to access the first page:

CYourSheet * pSheet =
  DYNAMIC_DOWNCAST(
   CYourSheet,
   GetParent()
   );
 if( pSheet != NULL )
 {
  pSheet->m_page1.m_combobox.GetCurCel( ... );
 }