|
-
September 29th, 1999, 01:53 AM
#1
CPropertySheet in Wizard Mode
Env: VC++ 6.0
Hi,
I've created a wizard based application using the CPropertySheet class. The wizard has a total of 8 pages/steps. The 7th page is totally "automated" and the user does not have to do anything. In other words, when the user clicks "Next" on page 6, the 7th page does something and then automatically goes to the 8th page.
I've been able to figure out how to switch pages. I used SetActivePage for that. I managed to disable the "Back" button on page 7 using
((CWizard *)GetParent())->SetWizardButtons(~PSWIZB_BACK);
in the OnInitDialog of page 7.
How do I disable the Next button? (I want both the Back and Next buttons disabled on Page 7)
On the last page, I've changed "Next" to "Finish" and disabled "Back". How do I disable "Cancel"?
Awaiting an early response,
With Regards,
Anuj
With Regards,
Anuj Seth
-
September 29th, 1999, 12:30 PM
#2
Re: CPropertySheet in Wizard Mode
use GetDlgItem(IDCANCEL) in the property sheet(not the page)to get a pointer to the cancel button and then call EnableWindow
-
September 29th, 1999, 11:20 PM
#3
Re: CPropertySheet in Wizard Mode
Hi,
Thanks for the reply! I was using GetDlgItem, but on the page and not the sheet!
Thanks a ton..
With Regards,
Anuj Seth
-
September 30th, 1999, 02:06 PM
#4
Re: CPropertySheet in Wizard Mode
You are almost there. But by using ~PSWIZB_BACK you enabled all buttons except the BACK.
Do this:
((CWizard *)GetParent())->SetWizardButtons(PSWIZB_BACK); // Show BACK button
((CWizard *)GetParent())->SetWizardButtons(PSWIZB_NEXT); // Show NEXT button
((CWizard *)GetParent())->SetWizardButtons(PSWIZB_BACK | PSWIZB_NEXT); // Show BACK and NEXT
((CWizard *)GetParent())->SetWizardButtons(0); // Show none of them
Hope that helps.
I hate fat programs as much as I hate being fat myself. I am lean and mean and so is my program.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|