cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
FELLAFOO
Level 3

DLG_INFO_ALTIMAGE_HIDPI (Does not seem to work)

I'm running version 22 SP1 which should support PNG files with transparency.

In my InstallScript I call...

SdInit(); in OnFirstUIBefore

Instead of calling DialogSetInfo ( DLG_INFO_ALTIMAGE, "My.bmp;0;0;;0,0,0", TRUE )

I try to call DialogSetInfo ( DLG_INFO_ALTIMAGE_HIDPI, "My.png;200", TRUE )

Instead of my own image, which I added to Language Independent Support Files, I get the default IS image.

Though probably not related, DLG_INFO_ALTIMAGE_HIDPI is not recognized by code completion, but does compile without error.

Any ideas?
Labels (1)
0 Kudos
(4) Replies
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

The expected values passed to the szInfoString and nParameter parameters of DialogSetInfo are treated differently when passing DLG_INFO_ALTIMAGE_HIDPI. szInfoString should be the image file (including the path; SUPPORTDIR is assumed otherwise) to be used, and nParameter should be set to the scaling factor of the image (100, 125, 150, etc.). If these parameters are not valid, DialogSetInfo will return an error.

Images should be sized/scaled as expected for the normal dialog header area image (the old InstallShield header image is 180x75 pixels, the new image is considered 200% scale and is 360x150 pixels).

Since DLG_INFO_ALTIMAGE_HIDPI was added in a service pack for IS 2015, I don't recall if the parameter information was updated in the DialogSetInfo doc. It is available in the IS 2016 docs here: http://helpnet.flexerasoftware.com/installshield23helplib/installshield23helplib.htm#Subsystems/LangRef/helplibrary/LangrefDialogSetInfo.htm
0 Kudos
FELLAFOO
Level 3

I created a new InstallScript project using the 'Blue' dialog skin.

The first line in OnFirstUIBefore() is:

SdInit();
nResult = DialogSetInfo( DLG_INFO_ALTIMAGE_HIDPI, "My.png" + ";200", TRUE );

I've inserted "My.png" in the Language Independent Support Files folder.

My.png is 128x128 pixels.

nResult returns a value of -2. This image does not appear in any of the dialogs. I have no idea what I'm doing wrong.

Thank You,

MFM
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

These parameters are invalid when using DLG_INFO_ALTIMAGE_HIDPI. As the DialogSetInfo documentation states:

szInfoString

When DLG_INFO_ALTIMAGE_HIDPI is passed in nInfoType, this parameter specifies the file name of a high DPI image to display, optionally including the path. If no path to the file is specific, the file is assumed to be in SUPPORTDIR. If this file does not exist, DialogSetInfo returns ISERR_FILE_NOT_FOUND.


nParameter

When nInfoType is DLG_INFO_ALTIMAGE_HIDPI, nParameter specifies the DPI scaling percentage. For example, pass 200 for a 200% image scale, 150 for a 150% scale, etc. The minimum supported scaling value is 25. If 0 is passed for this value, no image is displayed. If DLG_INFO_ALTIMAGE_REVERT_IMAGE is passed, the previous image used is displayed.


As such, the DialogSetInfo call needs to be something like the following when using DLG_INFO_ALTIMAGE_HIDPI:

DialogSetInfo( DLG_INFO_ALTIMAGE_HIDPI, "My.png", 200 );


If my.png is not present in SUPPORTDIR, DialogSetInfo will return an error.
0 Kudos
FELLAFOO
Level 3

Thank you for the clarification. That works much better. 😉

I was thrown off by the What's New in 2014 info about DPI-awareness. There is a reference to the new format, @@ResourceID;ScaleFactor, versus the previous, @BitmapResourceID;TransparentFlag;3-DFlag;;TransparentColorKey. So I assumed "My.bmp" + ";1;0;;0,128,128" would become "My.png" + ";200"

MFM
0 Kudos