Archive: NSD_CreateLink doesn't create link in dialog 1044


NSD_CreateLink doesn't create link in dialog 1044
Hey guys,

I'm stuck. If I do:

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.

You have to create the link in the show callback function for the page if this is a MUI thing...


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


Originally posted by Afrow UK
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?

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


Originally posted by Afrow UK
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.