Archive: No progress bar in the UltraModern UI


No progress bar in the UltraModern UI
I have been playing around with the various interface options and decided to port my test downloader to the UltraModern UI. The only issue I have run across so far is that the download progress bar isn't drawn in the Ultramodern UI. If I use the ModernUI then it works as normal.

Is this a known issue with UMUI?

I am trying to figure out how the UMUI differs in the creation of the window. Running in a debugger, I can see that NSISdl gets something for the HWND of the parent window. I am just not sure which window's handle it is getting because it does all the drawing but there is no control to be seen.

Jon


Hello,

It is a known issue.

This is a workaround:
Simply, add this section before all others in your code:

                Section ""
SetDetailsPrint none

Push $0
Push $8

FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $8 $0 1004
System::Call "user32::InvalidateRect(i,i,i)i (r8, 0, 1).r4"

Pop $8
Pop $0

SetDetailsPrint both
SectionEnd

Thanks for the help but that didn't seem to work. I notice you are getting a handle to and invalidating the standard install progress bar control. That particular control displays fine. :(

My problem is with the secondary progress bar that NSISdl displays (and I assume other download plugins.) As it is now, NSISdl gets a handle for the two "details" controls and hides them (which works) then creates another static text box and a second progress bar. Both function calls seem to succeed in the debugger (I get handles to the controls) but neither show up! I am wondering if they are behind something but all this is a new world for me - I never did much UI programming.

This issue is the only thing keeping me from using a beautifully skinned installer instead of the same ol' boring thing. After all my pixel pushing this is getting to me! :D

I am looking for something I can do to fix this from within NSISdl. There maybe a way to improve its window handling code so that workarounds aren't neccessary but I start getting nervous when I see all the HWNDs flying around. That esoteric art simply isn't my forte.

Jon


OK, I found out that (almost) everything works if I remove the "WS_CLIPSIBLINGS" style from the progress bar and static text that NSISdl creates. There doesn't seem to be any flickering and the plugin still works in the old school interface.

I also modified the code to copy the "ctlcolors" structure to the new static text from the old so that the created progress text matches the general theme.

So everything seems to work now, thanks for the help. :)

Jon