Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 29th September 2009, 09:32   #1
yudyzhao
Junior Member
 
Join Date: Sep 2009
Posts: 7
Help -> nsDiaglogs issue: some label is overlap in second page

I use created 2 custom pages by nsDialogs.nsh. The first show the label, button and link very well. But after go to next page, the label looks like be overlapped by some other controls.
I post the code and the sreenshort here, someone please take a look and give me some idea how to solve it.
Thanks!

The first page show the Window Installer 3.1 installation:
==========================================================
nsDialogs::Create /NOUNLOAD 1018
Pop $WindowsInstallerDialogHandle

${If} error == $WindowsInstallerDialogHandle
Abort
${EndIf}

${NSD_CreateIcon} 5u 8u -40u 31u

${NSD_CreateLabel} 40u 8u -40u 31u "$(WindowsInstallerIniField2Text)"
Pop $WindowsInstallerInfoLabelHandle

${NSD_CreateLabel} 40u 28u -40u 31u "$(WindowsInstallerIniField3Text)"
Pop $SecondInstallerInfoLabelHandle

Call IsWindows3Dot1RedistibutablePresent
Pop $0
${If} 1 == $0
; show button
${NSD_CreateButton} 60u 93u 144u 14u "$(WindowsInstallerIniField5Text)"
Pop $WinInstallerFromDiskButtonHandle
${NSD_OnClick} $WinInstallerFromDiskButtonHandle InstallWindows3Dot1 ; button clicked event
${EndIf}

${NSD_CreateLink} 60u 72u -40u 10u "$(WindowsInstallerIniField4Text)"
Pop $WinInstallerLinkHandle
${NSD_OnClick} $WinInstallerLinkHandle OnWindowsInstallerLinkClicked

; Show the dialog
nsDialogs::Show
Return
============================================================

The second page show the .NET 3.5 installation:
============================================================
nsDialogs::Create /NOUNLOAD 1018
Pop $DotNetDialogHandle

${If} error == $DotNetDialogHandle
Abort
${EndIf}

${NSD_CreateIcon} 5u 9u -40u 31u

${NSD_CreateLabel} 40u 9u -40u 31u "$(DotNet3IniField2Text)"
Pop $DotNetInfoLabelHandle

${NSD_CreateLabel} 40u 30u -40u 31u "$(DotNet3IniField3Text)"
Pop $SecondDotNetInfoLabelHandle

Call IsDotNet3RedistibutablePresent
Pop $0
${If} 1 == $0
; show button
${NSD_CreateButton} 60u 91u 144u 14u "$(DotNet3IniField5Text)"
Pop $NetFromDiskButtonHandle
${NSD_OnClick} $NetFromDiskButtonHandle InstallDotNet3 ; button clicked event
${EndIf}

${NSD_CreateLink} 60u 70u -40u 10u "$(DotNet3IniField4Text)"
Pop $NetFromLinkHandle
${NSD_OnClick} $NetFromLinkHandle OnDotNetOnLinkClicked

; Show the dialog
nsDialogs::Show
Return
============================================================
Attached Images
File Type: jpg label invisible.jpg (37.7 KB, 307 views)
yudyzhao is offline   Reply With Quote
Old 29th September 2009, 15:23   #2
CrushBug
Senior Member
 
Join Date: May 2005
Posts: 119
As best as I can tell, you are seeing the exact same bug that I am seeing.

This really seems to be a NSIS/nsDialogs redraw issue. I don't think that there is anything that we can do about it unless it is fixed in the code.
CrushBug is offline   Reply With Quote
Old 2nd October 2009, 20:02   #3
CrushBug
Senior Member
 
Join Date: May 2005
Posts: 119
In the last 2 days, I have actively fighting with this issue. The common point seems to be that for the first Label control on the first nsDialogs custom page, that label will eventually turn invisible. It feels like a redraw issue as you can drag another window over the misbehaving installer window and you will see your label text come back.

Today, at the suggestion of one of our programmers, his idea has actually solved the problem, but I doubt it is a good permanent fix and that the true bug is still hidden. For now, this solution works for us and I wanted to post about it here to get some feedback.

Our programmer remembered a problem a year ago or so with a Windows app that was having a similar label redraw issue and the solution ended up being to remove the EX Transparent style from the control. nsDialogs sets this extended style for label controls. What we did was go into the nsDialogs.nsh file and comment out line 189:

PHP Code:
!define __NSD_Label_EXSTYLE ${WS_EX_TRANSPARENT
We now have two different installers who's first-nsDialogs-label-disappearing bug no longer occurs.

So, how do we go about getting this fixed properly?
CrushBug is offline   Reply With Quote
Old 5th October 2009, 15:55   #4
CrushBug
Senior Member
 
Join Date: May 2005
Posts: 119
Sorry, the commenting out of the line was a dumb move, as it just caused warnings. We have since changed the line to
PHP Code:
!define __NSD_Label_EXSTYLE 0 
So, any ideas on how to address this issue properly? Anyone?
CrushBug is offline   Reply With Quote
Old 6th October 2009, 06:53   #5
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
You might want to submit this as a bug report in the bug tracker?

http://nsis.sourceforge.net/Bug_Reports
MSG is offline   Reply With Quote
Old 6th October 2009, 07:46   #6
CrushBug
Senior Member
 
Join Date: May 2005
Posts: 119
Wow, I feel dumb now. I was looking for the bug link, but I think I kept searching for "tracker". /selfsmack

I will get this filed tomorrow. Thanks MSG!
CrushBug is offline   Reply With Quote
Old 6th October 2009, 17:41   #7
CrushBug
Senior Member
 
Join Date: May 2005
Posts: 119
OK, bugs filed. Thanks for the help MSG.
CrushBug is offline   Reply With Quote
Old 10th September 2010, 11:50   #8
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
Don't mean to resurrect this super-old thread - but I was going to log a bug and noticed this one in the queue there.
One way to make this 'bug' show up is by moving the window off-screen, them moving it back on-screen.. forcing a repaint of the dialog, and making the portions disappear.

I say 'bug' because you mention...
Quote:
Originally Posted by yudyzhao View Post
I use created 2 custom pages by nsDialogs.nsh. The first show the label, button and link very well. But after go to next page, the label looks like be overlapped by some other controls.
What makes you think that the controls are, in fact, not overlapped?
If you replace CreateLabel with CreateButton, you can check the bounds of the control you're creating.. and you'll see that they do overlap.

That said.. I don't see the first label disappearing - it's the second one that goes away for me - so it might be unrelated.
Animaether is offline   Reply With Quote
Old 10th September 2010, 12:50   #9
demiller9
Senior Member
 
Join Date: Mar 2006
Location: Dallas
Posts: 462
Could you be using mouse driver ipoint.exe v6.1? That caused redraw issues for me until I updated it to v7 (see this thread)

Don
demiller9 is offline   Reply With Quote
Old 10th September 2010, 16:39   #10
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
Yes, one control covers another:

${NSD_CreateLabel} 40u 8u -40u 31u "$(WindowsInstallerIniField2Text)"
Pop $WindowsInstallerInfoLabelHandle

8+31=39, but the following top is only 28:

${NSD_CreateLabel} 40u 28u -40u 31u "$(WindowsInstallerIniField3Text)"
Pop $SecondInstallerInfoLabelHandle

and the second one also:

${NSD_CreateLabel} 40u 9u -40u 31u "$(DotNet3IniField2Text)"
Pop $DotNetInfoLabelHandle

31+9=40, but top position of next control is 30:

${NSD_CreateLabel} 40u 30u -40u 31u "$(DotNet3IniField3Text)"
Pop $SecondDotNetInfoLabelHandle
jiake 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