Archive: Resize nsDialogs window


Resize nsDialogs window
Hi!

I've been looking for it a lot in this forum and in Google and didn't find the exact answer I was looking for...

I created an installer using nsDialogs after reading that InstallOptions got deprecated. Everything went well so far but now I'd like to resize the window. I did modify dialog 105 in modern.exe with ResHacker, but it doesn't change anything in nsDialogs.

So, is it possible to modify the size of the window in any way for nsDialogs? Where does nsDialogs gets its dimensions from?

Thank you.

Valentin


IIRC nsDialogs gets its size from the child control id you pass when you create the dialog, normally 1018


if you know how to use res hacker resize control 1018 i also usaully resize 1044 too


Thanks for your replies.

I do know how to use ResHacker, but I didn't find the file I need to hack. In NSIS\Contrib\UIs, I tried every executable and only found 1033 controls.

It looks like there are no such things as 1018 or 1044 controls in modern.exe or standard.exe or even nsDialogs.dll...

Could you please tell me where I find these controls?


You missed it. 1018 is in dialog 105 of modern.exe.

Stu


I found it now. So I modify the dimensions from ResHacker, only for 1018 and 1044 in C:\%ProgFiles%\NSIS\Contrib\UIs\modern.exe, dialog 105.

But when I launch my NSIS script (which uses nsDialogs::Create 1018), nothing changes. It looks like it doesn't take into account any changes in modern.exe because even if I delete it, it doesn't say anything and opens always with the same dimensions.

Anders and ZmAn3, are you talking about nsDialogs or MUI?
Do I have to do something more to indicate to NSIS to take new changes into account?
Do I have to modify other values than just 1018 and 1044 width and height?

Thank you! Your help is much appreciated!


Did you Compile and save?

Stu


Yes. I can even see the result in opening the modern.exe directly after my modifications.


i could be wrong but i think it uses both uis when compiling with mui2 anyways grab this it has a resized ui and sample script i have a few more if you need them

http://zman3.deviantart.com/#/d35wzxk


Adding MUI2 and an instFiles page resolved my problem!
Thank you very much ZmAn3! Your script helped me a lot! :up:

I wasn't using an InstFiles page, so NSIS didn't execute the install section. I did it on purpose since I didn't want any instFiles page, but I didn't know it wouldn't accept to show a custom UI in this case. So I added some lines to add an InstFiles page with MUI and it did the trick :

!include "MUI2.nsh"

!define MUI_UI "myCustomUI.exe"

!insertmacro MUI_PAGE_INSTFILES


Then, to go back to where I was before (no instFiles page), I added a code which makes my installer quit before loading instFiles page, just as it was doing before :
!define MUI_PAGE_CUSTOMFUNCTION_PRE instFilesPre     ; Just before "!insertmacro MUI_PAGE_INSTFILES"

Function instFilesPre
Quit
FunctionEnd


All my code is executed in the leave function of my previous custom page, not in install section.
So now I can resize the UI with ResHacker or ResEdit the way I want it and NSIS takes it into account when compiling! :D

Thanks again!

Bye

Valentin