简体   繁体   中英

Attach an OnChange handler to existing textbox control NSIS

I'm trying to attach an onchange event handler to the existing Install directory textbox in NSIS. However, it never seems to trigger. Any ideas how I can do this?

GetDlgItem $TextControl $HWNDPARENT 1019
GetFunctionAddress $R0 MYFUNCTION
nsDialogs::OnChange  $TextControl $R0

I've used Resource hacker to get the control ID and I added the above code to a MUI_PAGE_CUSTOMFUNCTION_SHOW before displaying the MUI_PAGE_DIRECTORY.

Any help on getting a function to trigger on an already existing control would be greatly appreciated.

Thanks

The nsDialogs On* callbacks only works on nsDialogs custom pages.

You can use the .onVerifyInstDir function callback if you need to inspect the $InstDir variable on the directory page.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM