Archive: Align an image in a bitmap control


Align an image in a bitmap control
Hello,

My installer needs to display a bmp file during the installation process. The bmp file is dynamically loaded during installation so I can not know its exact size. I am using a code like this:


${NSD_CreateBitmap} 0 0 150 150 ""
Pop $R0
${NSD_SetImage} $R0 "$TEMP\my_image.bmp" $R1

The bitmap size is maximum 150X150. Is there any way to align the image within the bitmap control? as it is now it is always displayed close to the top left corner. I looked for a way to read the size of the bmp file and then do the math of where to create the bitmap, but it seems there is no easy way to do it. I also tried to add SS_CENTER attribute to the bitmap with no luck.

Any idea?


Add both SS_CENTER & SS_CENTERIMAGE styles


Thanks! I added SS_CENTER before which did not work, I missed the SS_CENTERIMAGE ... arrr feel so dumb :-)