Old 13th August 2019, 14:55   #1
DivyaArun
Junior Member
 
Join Date: Jul 2019
Posts: 30
Icon already set not updated with another icon

Hi,

I have set an icon with a label in a custom page to display a validation status. When the validation fails, it shows error icon else done icon. My problem is once an icon is set say error icon, I can navigate to previous page to put some value that can make validation success. So as I proceed to next page, the validation success message and done icon should be displayed. But always the first icon is shown , in this case error icon will be set whereas in actual it should be done icon.

Function StartValidation

Call ValidateSite
${If} ${Errors}
SendMessage $Page5_SiteValidateStatusLbl ${WM_SETTEXT} 0 "STR:Site not validated"
File /oname=$PLUGINSDIR\image.ico "error.ico"
${NSD_SetIcon} $Page5_StatusImage $PLUGINSDIR\image.ico $Page5_ImageHandle

${Else}
SendMessage $Page5_SiteValidateStatusLbl ${WM_SETTEXT} 0 "STR:Site ID successfully validated"
File /oname=$PLUGINSDIR\image.ico "done.ico"
${NSD_SetIcon} $Page5_StatusImage $PLUGINSDIR\image.ico $Page5_ImageHandle
${EndIf}

FunctionEnd

Function Page5

${NSD_CreateIcon} 0.09u 21.54u 16 16 ""
Pop $Page5_StatusImage
${NSD_AddStyle} $Page5_StatusImage ${SS_REALSIZECONTROL}

nsDialogs::Show
${NSD_FreeImage} $Page5_ImageHandle
${NSD_FreeIcon} $Page5_StatusImage

FunctionEnd
Please help.
DivyaArun is offline   Reply With Quote
Old 13th August 2019, 16:49   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,165
Probably not overwriting the .ico file. Use different filenames for each or force overwrite.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 14th August 2019, 04:55   #3
DivyaArun
Junior Member
 
Join Date: Jul 2019
Posts: 30
Quote:
Originally Posted by Anders View Post
Probably not overwriting the .ico file. Use different filenames for each or force overwrite.
Giving different file name worked. Thanks
DivyaArun is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump