Archive: Bitmap on custom page not aligned to left edge of dialog


Bitmap on custom page not aligned to left edge of dialog
I've got a custome dialog page that has a bitmap in it. I want the bitmap aligned to the left edge of the dialog so there is no empty space between the bitmap and the left edge of the dialog. In my ini file for the dialog I have the following entry for displaying the bitmap,

[Field 5]
Type=bitmap
Text=MyImage.bmp
Left=0
Right=16
Top=0
Bottom=314

I figured Left=0 would but the image right on the edge of the dialog but there is clearly space in between the bitmap and the edge of the dialog. Any ideas?


Does in the ".ini" (left, bottom, right, Top units) has the same values that the bitmap's width and height?


Yes. Although if I change the dimensions it resizes the image to fit the dimensions.


InstallOptions replaces the inner window of the NSIS dialog.

There is usually a margin between the inner window and the edge of the dialog.

You can add an extra rect to the UI dialog resource and use the IO Rect setting.


InstallOptions replaces the inner window of the NSIS dialog.
That makes sense then.

You can add an extra rect to the UI dialog resource and use the IO Rect setting.
I don't know what you mean by adding an extra rect though. Do you mean I need to modify the dialog resource exectuable?

So you are using the Classic UI and want to add a page with an image on the left side, like the Modern UI Welcome page?

You should modify the UI (Contrib\UIs\default.exe) and use ChangeUI.


So you are using the Classic UI and want to add a page with an image on the left side, like the Modern UI Welcome page?
Yes, that's exactly what I want to do. I'll definitely try that out. Thanks!

I could be looking at this wrong but ChangeUI doesn't seem to let you change the appearance of the finish page.


ChangeUI allows you to use a different resource exe file, one that has the shape and controls you want.


ChangeUI allows you to use a different resource exe file, one that has the shape and controls you want.
Sure I understand that. However, I'm looking at the resource exe's that are currently there (default, modern, modern1) and I don't see any visual relation between the dialog's in those files and the ones that are used in my installer. I'm sure they are related I just find it difficult seeing any relation at all. Is there an easy way to tell?

The black rect in the middle of dialog 105 is the one NSIS puts the dialog on. You need to create another one just like it, resize it to fill the width of the installer and tell InstallOptions to use it with the Rect field in the Settings section of the INI file.

Because NSIS puts the other dialogs "inside" that rect you will never see a "complete" dialog in the resource editor only parts of it. Other than that some controls are hidden by default and are unhidden by NSIS at runtime, that might create a difference too.


That was the key. Once I set "Rect" equal to 1044 I got what I was looking for. Thanks alot for your help guys!