Archive: A small redraw issue of MakensisW's SettingsDialog


A small redraw issue of MakensisW's SettingsDialog
I want to feed back a small bug in MakensisW. (Maybe it's not MakensisW's fault.)

When you:
1. run a new instance of Makensisw.exe ...
2. Open the [settings] dialog of the makensisW...
3. (Without any other window-views switching.)Move the [settings] dialog to a right-top position, but here, donnot let the entire dialog region move away from the display area of it's parent window(the MakensisW main window).

Then the bug here:
A transparent window area appears, Please just look at my screenshot in the attachment.


Excuse for my poor English description.:p


Precondition:
Disable the MS-Windows appearance effect [Show Window contents while dragging]...



//global var flag.
static fRedraw = TRUE; //Flag -> only handle at first time.

//intercept the WM_MOVE message in SettingsProc()...
//and both in SymbolSetProc().

case WM_MOVE:

{
if(fRedraw)
{
fRedraw=FALSE;

InvalidateRect(hwndDlg,NULL,TRUE);
SendMessage(hwndDlg,WM_NCPAINT,1,0);
}

break;
}


This will be ok, but I don't know why. why do windows need the application ownself handle the redraw?8

I can't reproduce this with or without the "Show window contents..." effect. Can you reproduce this on more than one computer? Are you sure it's not a result of a buggy display driver or some other program that might be messing with the display? SettingsProc, which handles all the messages of the settings dialog, always returns FALSE which lets the default Windows dialog procedure handle everything, including drawing, with the defaults.


I reproduced this error the other day on Windows 2000, but it won't do it today (at home) on Windows XP SP2.

Don


I can't reproduce on either Windows NT4 or XP and that screenshot was taken on XP.


Originally posted by kichik
I can't reproduce this with or without the "Show window contents..." effect. Can you reproduce this on more than one computer? Are you sure it's not a result of a buggy display driver or some other program that might be messing with the display?
http://logicsmart.bokee.com/inc/win2k3.PNG
In fact, I have reproduced this on severl different computers(Win XP or Win 2003 on my classmates' PCs, and different Windows OS on VM-Virtual PC or MS-VPC), but no problem on Win2k or Win98.
I actually considered it should be no problem and I am still not sure it is MakensisW's fault.

Originally posted by kichik SettingsProc, which handles all the messages of the settings dialog, always returns FALSE which lets the default Windows dialog procedure handle everything, including drawing, with the defaults.
Yes, I know about this, so I wanna know why error occurs on some computers.

Oh, I think of something.
All those computers with this problem have the UXthemePatcher installed in order to apply third party themes.
Maybe... Can this be the cause?


I am sorry to tell that UXthemePatcher is not the real cause of it.

I just reproduced the issue on two other computers.

One with Win2000:
http://logicsmart.bokee.com/inc/Win2k.png


The other with WinXp(without UXthemepatcher):
http://logicsmart.bokee.com/inc/xp-clsthm.png


And also, I find some computers which installed WinXP have no problem about it.

:igor: (Oddly~)

I can't get the pictures you've uploaded. Try using stashbox.org instead. Or do they all just show the white rectangles on different OSes?

Have you tried reproducing this in safe mode on a computer that exhibits the problem? That should narrow down the search.

I also haven't asked the obvious - does this happen with any other dialogs or programs?


There must be something wrong with my blog server these days.
Yeh, those pictures show the issue on different OSes,
they have been reuploaded to stashbox.org.

one picture at #6 & two pictures at #8
http://stashbox.org/20631/1/win2k3.pnghttp://stashbox.org/20631/win2k3.png
http://stashbox.org/20632/1/Win2k.pnghttp://stashbox.org/20632/Win2k.png
http://stashbox.org/20634/1/xp-clsthm.pnghttp://stashbox.org/20634/xp-clsthm.png



I have reproduced it in the safe mode, and...
as far as I know, there are no other dialogs have the same or similar problem on all those computers.:hang:

what about switching makensisw to wxwidgets, like nsismenu? :)

it needs some work anyway, because of the lack of support for the new /p switch.


Try the attached version. It may have redrawing issues with resizing.


Hi, kichik.

Yeah, thanks.
However, this version still has redrawing issues on that settings dialog.

Intercept the WM_MOVE message in SettingsProc() and SymbolSetProc(), and do once-redrawing works.
This will be a solution of the very problem.
I have attached a single makensisw.cpp file with a little modified.


BTW, this issue occurs on quite a number of computers,(absolutely,not few number).
I hope this could be fixed, even though it seems not significant.

And...the compiled makesisw.exe.


Responding to WM_MOVE with a redraw is not an acceptable solution. It only masks the real problem of improper drawing.

Try this one.


I'm sorry. No improvement.:weird: