nsDialogs unterstützt dieses Ereignis nicht. Normalerweise würden Sie das OnChange-Ereignis zum Aktualisieren anderer Teile der Benutzeroberfläche verwenden.
Wenn Sie unbedingt das tun, müssen Sie einen Timer verwenden:
!include LogicLib.nsh
!include nsDialogs.nsh
Page Custom MyPageCreate
Page InstFiles
Var MyEdit
Var LastFocus
Function MyEditLostFocus
System::Call KERNEL32::GetTickCount()i.r0
SendMessage $9 ${WM_SETTEXT} 0 "STR:MyEditLostFocus, tick=$0"
FunctionEnd
Function DetectFocusTimerHack
System::Call 'USER32::GetFocus()i.r0'
${If} $0 <> $MyEdit
${AndIf} $LastFocus = $MyEdit
Push $0
Call MyEditLostFocus
Pop $0
${EndIf}
StrCpy $LastFocus $0
FunctionEnd
Function MyPageCreate
nsDialogs::Create 1018
Pop $0
${NSD_CreateText} 0 30u 100% 20u "Hello"
Pop $MyEdit
${NSD_CreateText} 0 60u 100% 20u "World"
Pop $9
${NSD_CreateTimer} DetectFocusTimerHack 333
nsDialogs::Show
FunctionEnd