Archive: Dialog refresh/redraw problem with UMUI


Dialog refresh/redraw problem with UMUI
I'm using the UMUI for the Installer

But sometimes I have a problem in the section selection page
It looks like the TreeContorl in this Page didn't get refreshed properly
See Screenshot:
http://www.thek.org/tikiwiki/show_image.php?id=193

somebody knows a quick hack to solve this problem?

Simple moving the Dialog helps (because it forces the Dialog to redraw, is there some way to do this automaticly?


regards
nobs


Did you contact to the developer of UMUI?


Indirectly: Yes

Normaly he is reading this forum too!
;-)


Hi nobs, all.

I get this once and awhile too with UMUI.

I normally see it on the "Files" progress bar
while files are being copied/installed.

If I "hide" the window under Windows, and bring it back up, it is "refreshed" correctly, so I know it has something to do with UMUI not capturing its redraw events correctly.

Another annoyance I have found, I wonder if you see it too...
When I move from Page to Page with UMUI, there is a "blink" refresh problem.

You can see the "box" where UMUI is drawn in blue, but it turns to "grey" box, and then moves to the next page.
This "flickering" is very annoying.

I have found a workaround for this problem in my own scripts, by having a "post" function for each page, and calling this routine:

/* This is needed to stop "flickering" when using UMUI */
Function RefreshPageKludge
!ifdef UMUI_INCLUDED
/* This is needed to stop "flickering" when using UMUI */
SetCtlColors $HWNDPARENT ${MUI_BGCOLOR} ${MUI_BGCOLOR}
!endif
FunctionEnd

Kinda lame, but it works.


I was kinda letting these problems "slide", mainly because I am hoping SuperPat will release his "beta2" of UMUI, which might already have these problems fixed.

Scott


Hello,

Originally posted by Sheik
I normally see it on the "Files" progress bar
while files are being copied/installed.

Another annoyance I have found, I wonder if you see it too...
When I move from Page to Page with UMUI, there is a "blink" refresh problem.

You can see the "box" where UMUI is drawn in blue, but it turns to "grey" box, and then moves to the next page.
This "flickering" is very annoying.
[/B]
Somtimes, With beta 2, I have these problems...

I will test the workaround of Sheik in the beta 2 shortly.

Hi SuperPat.

My "fix" only addresses the "flickering" problem when switching pages.

It does NOT fix the problem where UMUI doesn't refresh the page correctly, either right away, or while things are being displayed, say while the "Install Files" page is up and running.

Scott


Hi all,

Just an update on this.

I found a "sledgehammer" approach to fixing this problem,
at least for the ProgressBar on the InstPage section.

Here is what I did.

In my first Install files "section"
I do the following:

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

This forces a complete redraw of the ProgressBar.

It should be noted that the above does NOT fix the problem, if I add this code to a MUI_PAGE_CUSTOMFUNCTION_SHOW function for INSTFILES page.

It *has* to be used in your "files" section stuff to have it fix the problem.

My best guess? is that there is some sort of race going on, where the problem can only be fixed AFTER the "SHOW" function gets called, but before any files actually start to get installed.

Just as an added "hint", I am surprised you see the problem with the components page, I see there is this "hack" already in the C++ for the components page/tree.

// workaround for bug #1397031
<snip>
InvalidateRect(hwTree, NULL, TRUE);

(Which is where I really got the idea from) =)

Scott


Has the refresh bug been fixed yet?
If not, I will have to use the MUI rather than the UMUI.


Workaround
Hello guys

is there a way to get the on_click or a on_notify message from the Userinterface?

I tried to fix the redraw problem in the UMUI componentspage
but the only thing I was able to achieve was adding this lines .onmousemove Function

!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
push $1
push $4
push $8
FindWindow $1 "#32770" "" $HWNDPARENT
GetDlgItem $8 $1 1032
System::Call "user32::InvalidateRect(i,i,i)i (r8, 0, 1).r4"
# System::Call "user32::SetWindowPos(i,i,i,i,i,i,i)i (r8, 0, 0, 0, 0, 0, 67).r4"
pop $8
pop $4
pop $1
!insertmacro MUI_DESCRIPTION_TEXT ${SECGRP0000} $(DESC_SECTIONGRP_00)
# other insertmacro blablabla
!insertmacro MUI_DESCRIPTION_TEXT ${SEC0016} $(DESC_SECTION_16)
!insertmacro MUI_FUNCTION_DESCRIPTION_END


But the update problem still exists (it only redraws after moving the mouse)
also it doesn't update the Scrollbar of the window.

Can somebody give me hint?
regards Norbert

@SuperPat:
is UMUI already dead, or you are still developing it?

I haven't heard from SuperPat in awhile...
Not sure if he is still working on UMUI or not.

I am hoping if he isn't, that he at least puts out what he has of the "beta 2" of UMUI.

Even if its broken in places, I like some of the new things he has done, and could help clean up/fix them.

I don't want to invest any time in "fixing" the existing UMUI when I know he has a new version out there that will replace the existing one.

Scott


I always work on it in my free time but It remain unfinished.

This is the latest TODO List:
- Maintenance Page: coding of the function of Modification of an existing installation.
- Serial Number page: support of the safeguard of the parameters in the register, addition of the TOLOWER, TOUPPER and NUMBERS flags, To pass from an input to another during striking on the keyboard of the serial.
- Rewriting one of the macros managing UMUI Flags (They allow, amongst other things, to know which options were chooses in various pages...)
- Second reading and cleaning of all the code
- Complete the documentation
Corrections for InstallOptionEx:
* Transparent Icons are not transparent in the page...
* Button are not drawn if I use my SkinnedButton plugin... whereas that work very well with InstallOptions.