Archive: InstallOptions patch contribution


InstallOptions patch contribution
I don't know if this is the right place to post patches to InstallOptions, or if my patch is in the right format, but here it is.

Here's a short patch for InstallOptions that allows you to disable the next button in the same way you can disable the back or cancel buttons.


*** installeroptions.cpp.old Sat Jan 31 14:54:46 2004
--- installeroptions.cpp Tue Feb 10 13:12:08 2004
***************
*** 183,188 ****
--- 183,190 ----
int bCancelEnabled = FALSE; // by ORTIM: 13-August-2002
int bCancelShow = FALSE; // by ORTIM: 13-August-2002

+ int bNextEnabled = FALSE; // by nandhp: 10-February-2004
+
int bRTL = FALSE;

FieldType *pFields = NULL;
***************
*** 417,422 ****
--- 419,427 ----
bCancelEnabled = myGetProfileInt("CancelEnabled", -1);
bCancelShow = myGetProfileInt("CancelShow", -1);

+ // by nandhp: 2-February-2004
+ bNextEnabled = myGetProfileInt("NextEnabled", -1);
+
bRTL = myGetProfileInt("RTL", 0);

if (nNumFields > 0) {
***************
*** 888,893 ****
--- 893,899 ----
mySetWindowText(hBackButton,pszBackButtonText);

if (bBackEnabled!=-1) EnableWindow(hBackButton,bBackEnabled);
+ if (bNextEnabled!=-1) EnableWindow(hNextButton,bNextEnabled); // nandhp 10-F
ebruary-2004
if (bCancelEnabled!=-1) EnableWindow(hCancelButton,bCancelEnabled);
if (bCancelShow!=-1) old_cancel_visible=ShowWindow(hCancelButton,bCancelShow
?SW_SHOWNA:SW_HIDE);




After applying this patch to installeroptions.cpp, add "NextEnabled=0" to the Settings section of your INI file to disable the next button.

I don't see a real need for this patch. Usually people do not disable the Next button even before displaying page.

Moreover, the other settings (BackEnabled and CancelEnabled) are only provided for backwards compatibility.

To disable the button, you can use EnableWindow after you have initialized the dialog.