th_mi
16th May 2007 07:24 UTC
MUI custom page with bitmap
Hello
I try to create a custom page with a bitmap in it and I wont get it to work. I see my custom page, but no bitmap.
Unfortunately I did not find any example to find out what I made wrong.
Any ideas to my problem?
th_mi
My code of the custom page:
Function PageBitmap
File /oname=$PLUGINSDIR\Basic.bmp Basic.bmp
!insertmacro MUI_INSTALLOPTIONS_WRITE "basic.ini" "Field 1" "Text" "Basic.bmp"
!insertmacro MUI_HEADER_TEXT "Title" "Subtitle"
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "basic.ini"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "basic.ini"
FunctionEnd
bnicer
16th May 2007 08:28 UTC
Not sure, but extract should be before the write, after InitPluginsDir though.
th_mi
16th May 2007 08:51 UTC
@bnicer:
Hey, you were right, now I see my Bitmap.
but I still haven an other problem. I made my "ini" and I have my Bitmap on my dialog, but how do I set the dimensions and the location of my bitmap in the ini correct. It seems like there is a right alignment of the picture or whatever.... :rolleyes:
Thanks
th_mi
bnicer
16th May 2007 09:06 UTC
In HM NIS Edit you can edit the appearance of the ini file directly. The maximum dimensions in units (not pixels) I believe are -
!insertmacro MUI_INSTALLOPTIONS_WRITE "basic.ini" "Field 1" "Top" "0"
>!insertmacro MUI_INSTALLOPTIONS_WRITE "basic.ini" "Field 1" "Left" "0"
>!insertmacro MUI_INSTALLOPTIONS_WRITE "basic.ini" "Field 1" "Bottom" "140"
>!insertmacro MUI_INSTALLOPTIONS_WRITE "basic.ini" "Field 1" "Right" "300"
th_mi
16th May 2007 09:45 UTC
Hi bnice
I understand the what you'd like to ewxplain.
My layout should look like the bitmap I attached to this posting. My problem is that the Bitmap should be right aligned, and the only way I found out is by "trial and error" to change the size of the bitmap control im HM Edit as long as it has the right place.
Is there an other way to do this. Since the coordinates I use are no pixel coordinates and my Bitmap has i.e. 200x100 pixels, I have it to try out until it fits.
Greets
th_mi
bnicer
16th May 2007 10:25 UTC
I just had to figure this out too. The vertical and the horizontal conversion to pixels is not the same. Horizontal the ratio is 1.5 and vertical 1.625. On the bright side, the image will not be stretched. It retains the original size, unless you set the stretch flag which you won't do. You can then mouse drag the image where you like. Right clicking on the ini window and choosing from the context options Resize designer >> Modern UI might help. Maybe the layout image you attached could serve as a sort of template in the ini file itself. I guess it amounts to trial and error.
th_mi
16th May 2007 11:25 UTC
Thanks bnice, your answers helped me a lot :up: