activate greyed buttons at final screen
There are three buttons at the final screen (Exit, Options, Close), two of them greyed (Exit and Options), how could I activate them and write a function for them?
20 posts
and then I put this other code as a function when the page is left.Function MyGUIInit
# Create event handler for our parent window button.
ButtonEvent::AddEventHandler /NOUNLOAD 3
FunctionEnd
and that's all, then the greyed button should do what the function ComponentsLeave says, did I understood correctly?Function ComponentsLeave
# Find out if one of our buttons was just pressed.
ButtonEvent::WhichButtonID /NOUNLOAD
Pop $R0 # Control ID of button user pressed.
the problem is that the ExitFunction is loaded before the user can even click on a button.Page InstFiles "EnterInstall" "" "ExitFunction"
Ok, great, no need to edit the UI. I read it in the readme and I was wondering if I should still have to edit it.Originally Posted by Afrow UK View PostAh I see. You could try using ButtonEvent on both. Why do you need to edit the UI? If the button is already there you just need to enable it and show it (if it is hidden).
I am trying to read the examples, but I get lost easily.Page InstFiles "EnterInstall" "" "ExitFunction"
But I can't get the "back" button to be active when the installer has finished. This code makes it active while installing, but it turns grey again when it's finished.Function `.onInstSuccess`
ButtonEvent::WhichButtonId
Pop $R0
MessageBox MB_OK "$R0"
FunctionEnd
This function is called in the instfiles page:Function `obrir`
GetDlgItem $0 $HWNDPARENT 3
EnableWindow $0 1
FunctionEnd
Page InstFiles `` `obrir` ``
StuPage Components HideMyBackButton
Page InstFiles ShowMyBackButton
Page SomeOtherPage HideMyBackButton
Function HideMyBackButton
GetDlgItem $0 $HWNDPARENT 4
ShowWindow $0 ${SW_HIDE} ; WinMessages.nsh
FunctionEnd
Function ShowMyBackButton
GetDlgItem $0 $HWNDPARENT 4
ShowWindow $0 ${SW_SHOW} ; WinMessages.nsh
FunctionEnd
Correct me if I am wrong, but with this code the "MyBackButton" is showed at the beginning of the install, not at the end (when the close button activates)Originally Posted by Afrow UK View PostI have tried and all I can suggest is you add another button (i.e. ID of 4) over the top of the Back button with Resource Hacker and only show it on the InstFiles page. For the previous and next pages you will need to hide the button again (add a Show functions for both).
I.e.[code]Page Components HideMyBackButton
Page InstFiles ShowMyBackButton
Page SomeOtherPage HideMyBackButton