lovespy108
2nd January 2008 04:13 UTC
UninstallCaption problem
Var myCaption
(1)UninstallCaption "Application unintaller"
(2)UninstallCaption "$myCaption"
Function un.onInit
StrCpy $myCaption "Application unintaller"
MessageBox MB_ICONQUESTION|MB_YESNO "some words" IDYES +2
Abort
....
FunctionEnd
If I use way(1),the caption of MessageBox is "Application unintaller".
but if I use way(2),MessageBox has no caption.
What's the reason?
Thanks very much!
fabian.rap.more
2nd January 2008 08:30 UTC
When you change the value of $myCaption in the function it does not change the value in the caption as the function is not ended yet. if you check in a section aftes the initalisation of the uninstaller you can see that the caption has changed
fabian.rap.more
2nd January 2008 08:32 UTC
Function un.onInit
StrCpy $myCaption "Application unintaller"
MessageBox MB_ICONQUESTION|MB_YESNO "some words" IDYES +2
Abort
FunctionEnd
Caption "$myCaption" ;if on top then the uninstaller will crash
Section
MessageBox MB_ICONQUESTION|MB_YESNO "some words" IDYES +2
SectionEnd
bholliger
2nd January 2008 10:18 UTC
Re: UninstallCaption problem
Hi there!
The caption is initialised at runtime. You have to set the caption by other means.
Have a look at this wiki article:
http://nsis.sourceforge.net/Change_c...ler_at_runtime
Cheers
Bruno
bholliger
2nd January 2008 10:24 UTC
Re: Re: UninstallCaption problem
Or, try using this plug-in:
http://nsis.sourceforge.net/MessageBox_plug-in
Cheers
Bruno