Problems using Dialog Designer (1.Abort, 2.Move controls)

Please let our ADS show!

This sites offers only FREE software and it's supported by a few advertisement boxes (no intrusive popups).
Please:

  • disable your AdBlocker by adding CoolSoft website to whitelist
  • give the proper cookie consent
  • enable JavaScript for this website

This seconds wait is to let you update your browser configuration...

Ok, I've done the required changes... now show me your content!
!!! Please enable JavaScript !!!
Posts: 2
Joined: 7 Dic 2021 - 23:01
Problems using Dialog Designer (1.Abort, 2.Move controls)

Hi There,

Firstly, thank you for an excellent and time saving tool. I have found a couple of problems:

1. Skipping a page with Abort

When I have two custom pages created with Dialog Designer, and try to skip the first one with custom code that inserts an Abort, the second page crashes. I suspect the problem is that the code to test if the page is wanted is inserted AFTER the code to create the Dialog Page. Either I need to hand edit the resulting code, or I need to persuade you to allow us to add code BEFORE the dialog is created, much as we can with the MUI_PAGE_CUSTOMFUNCTION_PRE.

2. On a High DPI display, set to 150% scaling, when I move controls, they leave a mess behind that is not todied up until I click elsewhere in the window.

Posts: 1972
Joined: 25 Mar 2012 - 01:19
Re: Problems using Dialog Designer (1.Abort, 2.Move controls)
Greg Smith wrote:
1. Skipping a page with Abort

Should be great to have 2 samples:

  1. sample project created with NSISDialogDesigner (the one that crashes)
  2. same project + your fixes, to show me what's missing

Comparing the two I'd like to be able to find what's missing in the editor and/or if there's a better way to accomplish your requirements.

NOTE: sample projects must be as simpler as possible, with only the elements needed to show the issue.

Greg Smith wrote:
2. On a High DPI display, set to 150% scaling, when I move controls, they leave a mess behind that is not todied up until I click elsewhere in the window.

Well, the dialog designer was built with .NET 2.0, when HighDPI screens were not so widespread.
I suppose .NET 2.0 is not fully HighDPI-aware 🙄

Should have a look at it and upgrade to 4.x, but I can't make any promise...

Posts: 2
Joined: 7 Dic 2021 - 23:01
Re: Problems using Dialog Designer (1.Abort, 2.Move controls)

I feel really guilty in not checking for a reply for so long... so thank you for your response.

I wrote up our use of NSIS and the Dialog Designer as part of our internal documentation last year after sending you the original email and added a little information about how to avoid the problem. The attached pdf file (zipped) is a short extract that describes the problem in more detail and my assumption about the cause.

This came about because our application has quite a few Custom dialog pages, and we need the option of skipping pages that are not relevant to the current install.

If you put an Abort in the ControlCustomScript or CreateFunctionCustomScript sections, subsequent use of other Dialog Designer dialogs results in a crash. I cannot recall how I arrived at the conclusion that this was because the handle for the Dialog was already allocated, but Abort in this position abandonned ship without releasing it, resulting in problems later. I discovered that by always having a Show function, I could Abort within that, and then things were OK for subsequent use, so I presume that you trap this and release the handle.

If I am correct about the cause, it should not be too difficult for you to fix it... alternatively folks need warning about this due to the delayed nature of the problem and users who only have a single custom dialog will not see any problem at all.

The installer in which this came up is rather large and has proprietary stuff in it. If this description is not enough for you to identify the problem I guess I can make a project with a couple of dummy pages for you...

Anyhow, I much appreciate this very nice tool and thank you for providing it,

Greg Smith

Attachments (Only registered users)
NSISDlgDesign.zip