Archive: How to detect back and cancel button was clicked in nsDialog?


How to detect back and cancel button was clicked in nsDialog?
Hi everyone,

I created a nsDialog in my installer. How can I get my function called when user clicked back, cancel or next button?

Thank you,

William


For Back there's ${NSD_OnBack}. For Cancel, there's Function .onUserAbort.


Thank you for your answer.
Using !define MUI_CUSTOMFUNCTION_ABORT userAbort is a better way than define .onUserAbort.

Because when I use .onUserAbort the compiler complains exists function error.


It's not a better way, it's the only way :) Go with MUI_CUSTOMFUNCTION_ABORT.


oh, and Next btn how to get the handle when clicked?


GetDlgItem $R0 $HWNDPARENT 1

Stu


GetDlgItem $R0 $HWNDPARENT 1
Pop $R0
GetFunctionAddress $1 Quit_require
nsDialogs::OnClick $R0 $1

and
Function Quit_require
Quit
FunctionEnd

But don't quit it's change to next page


Why are you trying to assign OnClick to the Next button? That's what the page Leave function is for.

Stu