I am using a Basic MSI project.We have a custom setup dialog that has a feature tree which shows list of features.I want the NEXT button to be enabled only when the user selects a feature.If no feature is selected ,the NEXT button should be disabled.Please tell me detailed steps to make this work
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Enable/Disable NEXT button in custom setup dialog
Started by
preethas
, Jun 21 2006 11:55
3 replies to this topic
Posted 22 June 2006 - 08:53
Try to call Disable(nConstant ) function. The Disable function deactivates the user interface object or setup feature specified by the parameter nConstant.
// Disable the Back button in setup dialogs.
Disable (BACKBUTTON);
// Disable the Back button in setup dialogs.
Disable (BACKBUTTON);
Posted 22 June 2006 - 09:22
QUOTE (sebica79 @ 2006-06-22 09:53) |
Try to call Disable(nConstant ) function. The Disable function deactivates the user interface object or setup feature specified by the parameter nConstant. // Disable the Back button in setup dialogs. Disable (BACKBUTTON); |
Not for Basic MSI projects.
The problem is that the feature tree control doesn't send (at least not for all Windows and MSI versions) that you could use to disable the button.
As a workaround you could display an error message when the Next button is clicked.
However there may be better solutions:
In general, un-selecting all features is valid. It will result in an uninstall of the application.
If you don't want that, you could make at least one feature required so that it cannot be un-selected, e.g. the feature with your main executable, or the top level (root) feature (if you have one, which I recommend)
Stefan Krüger
InstallSite.org twitter facebook
Posted 22 June 2006 - 10:00
@Stefan: You're correct. My mistake, I should have been specfied this restriction related to type of the project.