Facing problem while making one button as Default on PropertySheet
-
I got a Property sheet with some pages on it in wizard style. On first page i am disabling the back and next button. The next button gets enabled when user enters something into edit control of page i.e. first page. Since Back and Next buttons are disabled while dispalying sheet, the cancel button is becoming as Default button. Now i want to make Next burtton as Default button as soon as user enters something into Edit control. So please give me suggestion or solution on this. Thanks for everything.
-
I got a Property sheet with some pages on it in wizard style. On first page i am disabling the back and next button. The next button gets enabled when user enters something into edit control of page i.e. first page. Since Back and Next buttons are disabled while dispalying sheet, the cancel button is becoming as Default button. Now i want to make Next burtton as Default button as soon as user enters something into Edit control. So please give me suggestion or solution on this. Thanks for everything.
That should happen automatically. What code do you use to re-activate the Next button? Good Luck, Bill
-
That should happen automatically. What code do you use to re-activate the Next button? Good Luck, Bill
Thanks Bill. Here is the scenario. I am enabling the Next button as soon as user enters something into Edit control. I mapped a message of edit control ON_EN_CHANGE in this function i am checking edit control is empty or not. If it is not empty then i am getting a pointer to next button from Sheet by using GetDlgItem(ID_WIZNEXT) and calling EnableWindow(TRUE). Now it is working perfectly as far as Enbling concerned. I want Next button as Default as soon as it gets enabled. Once again Thanks.
-
Thanks Bill. Here is the scenario. I am enabling the Next button as soon as user enters something into Edit control. I mapped a message of edit control ON_EN_CHANGE in this function i am checking edit control is empty or not. If it is not empty then i am getting a pointer to next button from Sheet by using GetDlgItem(ID_WIZNEXT) and calling EnableWindow(TRUE). Now it is working perfectly as far as Enbling concerned. I want Next button as Default as soon as it gets enabled. Once again Thanks.
Try using void SetWizardButtons( DWORD dwFlags ); It is a method of the parent property sheet. Its use is like this: Here is a snip from my last project that implemented wizards: CPropertySheet* pParent = (CPropertySheet*)GetParent(); ASSERT_KINDOF (CPropertySheet, pParent); pParent->SetWizardButtons(PSWIZB_NEXT | PSWIZB_BACK); // Disable buttons Hope this helps, Bill
-
Try using void SetWizardButtons( DWORD dwFlags ); It is a method of the parent property sheet. Its use is like this: Here is a snip from my last project that implemented wizards: CPropertySheet* pParent = (CPropertySheet*)GetParent(); ASSERT_KINDOF (CPropertySheet, pParent); pParent->SetWizardButtons(PSWIZB_NEXT | PSWIZB_BACK); // Disable buttons Hope this helps, Bill
Thanks Bill Yes it worked out...:)