Old 11th April 2013, 16:37   #1
scubanarc
Junior Member
 
Join Date: Aug 2009
Posts: 7
NSD_CreateLink doesn't create link in dialog 1044

Hey guys,

I'm stuck. If I do:
code:
nsDialogs::Create 1018
${NSD_CreateLink} 180u 132u 50% 13u "End User License Agreement"
Pop $Link
${NSD_OnClick} $Link LinkClick


The link works as it should, I get a hover hand, and the function "LinkClick" is executed. However, if I change the dialogID to 1044 then the I do not get a hover hand and LinkClick is not executed.

Why is this, and how can I fix it?

Thanks for any advice.
scubanarc is offline   Reply With Quote
Old 11th April 2013, 18:06   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
You have to create the link in the show callback function for the page if this is a MUI thing...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 11th April 2013, 18:13   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Are you trying to create a full screen UI (like the welcome and finish pages?) If so then you need to put Call muiPageLoadFullWindow before your code and Call muiPageUnloadFullWindow after. If you aren't using any welcome or finish pages, you also need !insertmacro MUI_PAGE_FUNCTION_FULLWINDOW. It sounds like you have one of the MUI header text controls over your link. The link will be rendered on top but will not receive any mouse events.

Stu
Afrow UK is offline   Reply With Quote
Old 12th April 2013, 02:32   #4
scubanarc
Junior Member
 
Join Date: Aug 2009
Posts: 7
Quote:
Originally Posted by Afrow UK View Post
Are you trying to create a full screen UI (like the welcome and finish pages?) If so then you need to put Call muiPageLoadFullWindow before your code and Call muiPageUnloadFullWindow after. If you aren't using any welcome or finish pages, you also need !insertmacro MUI_PAGE_FUNCTION_FULLWINDOW. It sounds like you have one of the MUI header text controls over your link. The link will be rendered on top but will not receive any mouse events.

Stu
Yes, I'm tryig to create a full screen UI. I do have a finish page and welcome page.

I think that you are on to something as we've made progress here. If I add Call muiPageLoadFullWindow before my code and Call muiPageUnloadFullWindow after AND move my link to the top of the page by setting the Y coordinate of the link to 0u then the link works. Then if I move it back down the page where it belongs it stops working. Seems like a Z order thing for sure. Any other thoughts?

Last edited by scubanarc; 12th April 2013 at 04:48.
scubanarc is offline   Reply With Quote
Old 12th April 2013, 06:36   #5
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Is your code in a custom page show function? Nothing else should be covering up your link unless you have other controls in your custom page. If you have a machine with Visual Studio installed you can inspect the windows using Spy++ (use the search tool).

Stu
Afrow UK is offline   Reply With Quote
Old 13th April 2013, 15:41   #6
scubanarc
Junior Member
 
Join Date: Aug 2009
Posts: 7
Quote:
Originally Posted by Afrow UK View Post
Are you trying to create a full screen UI (like the welcome and finish pages?) If so then you need to put Call muiPageLoadFullWindow before your code and Call muiPageUnloadFullWindow after. If you aren't using any welcome or finish pages, you also need !insertmacro MUI_PAGE_FUNCTION_FULLWINDOW. It sounds like you have one of the MUI header text controls over your link. The link will be rendered on top but will not receive any mouse events.

Stu
Thanks for your help Stu, Spy++ was a great idea. After running it I was able to see that other transparent controls were over my links and that is why they were not working. I suppose the reason that they worked on 1018 dialogs is because I had to rearrange them in order to see them since they are lower down on the 1044 dialog. When I moved the links up in the Y direction to test they were no longer buried under the offending transparent controls.

The solution for me was to rearrange the order that I create controls so that the links are created first and the other controls created later. This caused the expected behavior.

Again, thanks for the help.
scubanarc 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