PropertySheets and PropertyPages
-
Hi, I am working on property sheets. I have initially added 5 pages. I am using the SetWizardMode(). In the 3rd page, OnWizardNext(), based on some condition, I am trying to remove the 4th page using RemovePage(3). But I am unable to do so. Please let me know as how this could be done at runtime.
Taruni
-
Hi, I am working on property sheets. I have initially added 5 pages. I am using the SetWizardMode(). In the 3rd page, OnWizardNext(), based on some condition, I am trying to remove the 4th page using RemovePage(3). But I am unable to do so. Please let me know as how this could be done at runtime.
Taruni
Taruni wrote:
But I am unable to do so.
Why ? What is the exact problem ? EDIT: by the way, do you know that you can return the ID of the page you want to be displayed when you hit OnWizardNext ? So you could do that instead of removing the page.
Cédric Moonen Software developer
Charting control [v1.3]modified on Thursday, April 3, 2008 3:02 AM
-
Taruni wrote:
But I am unable to do so.
Why ? What is the exact problem ? EDIT: by the way, do you know that you can return the ID of the page you want to be displayed when you hit OnWizardNext ? So you could do that instead of removing the page.
Cédric Moonen Software developer
Charting control [v1.3]modified on Thursday, April 3, 2008 3:02 AM
I have a propertysheet with 5 pages. The following is the OnWizardNext() of page3. LRESULT CPage3::OnWizardNext() { if(Value == 1) { sheet.RemovePage(&sheet.page4); } return CPropertyPage::OnWizardNext(); } At run time, when the "Value" is 1, I shouldn't get page4 tab. I should remove that. But I am unable to do so. Is my code correct? Please let me know.
Taruni
-
I have a propertysheet with 5 pages. The following is the OnWizardNext() of page3. LRESULT CPage3::OnWizardNext() { if(Value == 1) { sheet.RemovePage(&sheet.page4); } return CPropertyPage::OnWizardNext(); } At run time, when the "Value" is 1, I shouldn't get page4 tab. I should remove that. But I am unable to do so. Is my code correct? Please let me know.
Taruni
Taruni wrote:
sheet.RemovePage(&sheet.page4);
:confused: What's that ? You said you were using RemovePage(3). What is page4 here ?
Cédric Moonen Software developer
Charting control [v1.3] -
Taruni wrote:
sheet.RemovePage(&sheet.page4);
:confused: What's that ? You said you were using RemovePage(3). What is page4 here ?
Cédric Moonen Software developer
Charting control [v1.3]As the parameter to the RemovePage is 0 based index of the page, I have tried to remove the page 4 by saying, sheet.RemovePage(3) and also I have tried by passing the reference of the page. sheet.RemovePage(&sheet.page4); But I was unable to remove the page.
Taruni
-
Taruni wrote:
But I am unable to do so.
Why ? What is the exact problem ? EDIT: by the way, do you know that you can return the ID of the page you want to be displayed when you hit OnWizardNext ? So you could do that instead of removing the page.
Cédric Moonen Software developer
Charting control [v1.3]modified on Thursday, April 3, 2008 3:02 AM
Your CPMRU is running low on power?
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
-
Your CPMRU is running low on power?
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
Nah, it's still broken :) . I should ask for a new one, seems it is required those days ;P
Cédric Moonen Software developer
Charting control [v1.3] -
I have a propertysheet with 5 pages. The following is the OnWizardNext() of page3. LRESULT CPage3::OnWizardNext() { if(Value == 1) { sheet.RemovePage(&sheet.page4); } return CPropertyPage::OnWizardNext(); } At run time, when the "Value" is 1, I shouldn't get page4 tab. I should remove that. But I am unable to do so. Is my code correct? Please let me know.
Taruni
Taruni wrote:
sheet.RemovePage(&sheet.page4);
What happens if you ever need to re-add the page? Have you considered something like:
LRESULT CPage3::OnWizardNext()
{
if (Value == 1)
return 3; // the id of the page you want to skip to
else
return CPropertyPage::OnWizardNext(); // the next page in line
}"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne