Archive: modern UI not refreshing when using progress bar


modern UI not refreshing when using progress bar
Hello,

I am using modern UI for my installer. I have a dialog page that is downloading some files, the way I implemented it is by embedding inetc plugin in the dialog. So I do something like:

Function DownloadPage
nsDialogs::Create 1018
Pop $DownloadDialog
.
.
.
// create some labels and text
${NSD_CreateTimer} StartDownload 1
nsDialogs::Show
FunctionEnd

Function StartDownload
${NSD_KillTimer} StartDownload

inetc::get /nocancel /caption "caption text" $AppUrl /END
Pop $0
FunctionEnd


So basically I create a dialog, display it and then use a timer to overlay the inetc progress bar on top of the dialog. The problem is that during the download the dialog underneath does not receive refresh messages so for example if another window hides it and is then removed, the dialog is not refreshed and the text and graphics disappear (only the progress bar is constantly refreshed).

Any ideas how to solve it? I thought of adding another time to keep refreshing the dialog but no idea how to do it. Maybe my solution is just not correct but I can not find any other cleaner way to embed a dialog into a dialog there is no way to "Create" the inetc object and insert it to the dialog in a clean way.

Ideas???


Cant help you based just off what your saying but I would like a copy of your script or a stripped down version for future referance of embedding the plugin if you dont mind:)

thanks


This is pretty much the relevant part of the script, just created a custom dialog called DownloadPage, the function for DownloadPage is listed above just add whatever elements to it and then use the timer to call another function to initiate the inetc right after the dialog::show is run.

Not sure it is a good method to copy as you can see there is a problem with it that hopefully can be resolved :-)


what about using
ShowWindow $yourcontrol ${SW_HIDE}
ShowWindow $yourcontrol ${SW_SHOW}

for each custom control in a timer ?


Does not work, first it creates flicker but the real problem is that it still not working, I believe the control does not know it needs to repaint its content, or maybe the problem is different. One of the controls is a bitmap once it is covered with another window and then revealed the bitmap is partially grey and does not get repainted.


Actually I take it back, the Dialog is refresh I had another error on my dialog (some resource panel with no content was on top of some controls, could not see it but found it after reviewing the resource files again) - so everything actually works fine with this solution.

Can close the thread :-)