Wizard Buttons not available
Posted: Tue Mar 02, 2004 5:30 am
Greetings to all mfc-programmers. I'new here, so let's start with a new thread.
I got a liiitle problem which hasn't absolute importance to be solved but is driving me crazy. I've been working on that now for several hours and I think it might be faster, if I ask in a forum.
I'm programming a wizard using the CPropertySheet- and CPropertyPage-Classes. As I've done before, I created a Sheet and added the Pages inside the Constructor. Well done, it works, I got 3 Pages now. The problem is: The first page should have the back-button disabled (of course), the second one should have enabled both the back- and the next-button. And the third should have enabled the finish-button and again the back-button.
In the OnSetActive-Method, I wroth the following):
p=(CEDTPropertySheet*)GetParent(); //p is pointing to the sheet
first page:
p->SetWizardButtons(PSWIZB_NEXT);
works fine, no problem
second page:
p->SetWizardButtons(PSWIZB_NEXT|PSWIZB_BACK);
well, this works too, never had problems
third page:
p->SetWizardButtons(PSWIZB_BACK|PSWIZB_FINISH);
looks good, doesn't it? Well but it doesn't work!
While running, the page is showing only the finish-button. If I choose PSWIZB_DISABLEFINISH instead of PSWIZB_FINISH, the button gets disabled, so the finish-button seems to work just fine. But where is the back-button? I've tried with the NEXT-button too. the same thing. My program just don't want me to show the back-button.
This are the definitions of my pages:
CEDTElectricDialog* electricdialog;
CEDTNodesDialog* nodesdialog;
CEDTFinishDialog* finishdialog;
and they are added in the following way:
electricdialog=new CEDTElectricDialog();
AddPage(electricdialog);
nodesdialog=new CEDTNodesDialog();
AddPage(nodesdialog);
finishdialog=new CEDTFinishDialog();
AddPage(finishdialog);
and nothing more.
I've been looking in older projects I've done, but every code is exactly the same. In the older projects these things work. But now?
Well, perhaps you should have the whole source-code for to find the solution but I'm not able to send this to you. But maybe there is a little error somewhere or a hint which I didn't saw.
Is there anybody who can help me?
Thanks in advance!
Archived topic from Iceteks, old topic ID:2112, old post ID:18044
I got a liiitle problem which hasn't absolute importance to be solved but is driving me crazy. I've been working on that now for several hours and I think it might be faster, if I ask in a forum.
I'm programming a wizard using the CPropertySheet- and CPropertyPage-Classes. As I've done before, I created a Sheet and added the Pages inside the Constructor. Well done, it works, I got 3 Pages now. The problem is: The first page should have the back-button disabled (of course), the second one should have enabled both the back- and the next-button. And the third should have enabled the finish-button and again the back-button.
In the OnSetActive-Method, I wroth the following):
p=(CEDTPropertySheet*)GetParent(); //p is pointing to the sheet
first page:
p->SetWizardButtons(PSWIZB_NEXT);
works fine, no problem
second page:
p->SetWizardButtons(PSWIZB_NEXT|PSWIZB_BACK);
well, this works too, never had problems
third page:
p->SetWizardButtons(PSWIZB_BACK|PSWIZB_FINISH);
looks good, doesn't it? Well but it doesn't work!
While running, the page is showing only the finish-button. If I choose PSWIZB_DISABLEFINISH instead of PSWIZB_FINISH, the button gets disabled, so the finish-button seems to work just fine. But where is the back-button? I've tried with the NEXT-button too. the same thing. My program just don't want me to show the back-button.
This are the definitions of my pages:
CEDTElectricDialog* electricdialog;
CEDTNodesDialog* nodesdialog;
CEDTFinishDialog* finishdialog;
and they are added in the following way:
electricdialog=new CEDTElectricDialog();
AddPage(electricdialog);
nodesdialog=new CEDTNodesDialog();
AddPage(nodesdialog);
finishdialog=new CEDTFinishDialog();
AddPage(finishdialog);
and nothing more.
I've been looking in older projects I've done, but every code is exactly the same. In the older projects these things work. But now?
Well, perhaps you should have the whole source-code for to find the solution but I'm not able to send this to you. But maybe there is a little error somewhere or a hint which I didn't saw.
Is there anybody who can help me?
Thanks in advance!
Archived topic from Iceteks, old topic ID:2112, old post ID:18044