Summary
Information on how to add image onto push button controlSynopsis
In your InstallScript or InstallScript MSI project, you may want to add an image to a push button control on one of our existing dialogs or a custom dialog. This Knowledge Base article will give you information on how you can do this in your InstallScript or InstallScript MSI project.
Discussion
Unfortunately there is no direct InstallScript function to add an image to a given push button control. However you can use some of the code from the SdOptionsButtons() dialog to mimic the way SdOptionsButtons() displays buttons with images on them.NOTE: Since we are using the logic from SdOptionsButtons() dialog, the same restrictions will apply when you use the code in another dialog/custom dialog. Mainly, you are limited to adding images to four or less push button controls and the control identifiers of the push button controls that will have images, need to match the same control identifiers on the SdOptionsButtons() dialog (...otherwise the images will not be placed).
Now some things to make note of...
1.) In the 'User Interface->Dialogs' view, go to the dialog you are going to modify and make sure that the push button control(s) which will have the bitmap image, has a control id of 101/102/103/104.
NOTE: Again since the logic from the SdOptionsButtons() dialog is being used, you need to use these exact control id's so that the InstallScript engine can find the push button controls and place an image on top of them. This also means that you are limited to 4 image buttons on a given dialog.
2.) On the same dialog, make sure to add a new bitmap control (...it can be placed in the lower half of the dialog). Now the purpose of adding this bitmap control is to simply add the custom image that you want on your dialog into the bitmap resources. This is important because you will reference these bitmap images in script, so you may need to add these bitmap control up to 4 times (...depending on the number of buttons you will be using). So to ensure that these bitmap control are not seen/used on the dialog (...but included in the resources), just set the 'Top' property to a value of 400.
3.) In the 'Behavior and Logic->InstallScript' view, you will want to go to the dialog function make 3 modifications. First, make sure you declare and initialize the following list variables...
LIST listButton, listDescrip;
...
listButton=ListCreate(STRINGLIST);
listDescrip=ListCreate(STRINGLIST);
ListAddString(listButton, "@10001;1;255,0,255", AFTER);
ListAddString(listDescrip, "Test", AFTER);
The listButton and listDescrip variables are needed because they will be used by an internal function. Now as far as why these values are needed, you can take a look at the help document for SdOptionsButtons() dialog above. For this adding images to a push button, it's really just the listButton variable that needs to be properly set (...since there is no description text controls, the listDescrip is essentially ignored). Lastly the @10001 is used because this is the internal bitmap id that was added to the dialog in step (2) above. The more bitmaps you add, the id will change to 10002 and so on.
Second, make sure you add the functions call...
SdOptionsButtonsInit( szDlg, hwndDlg, listButton, listDescrip );
...to the case DLG_INIT section of your dialog. The above function needs to be called during dialog initialization to that the images you reference are properly drawn on top of the push button controls (101, 102, 103, 104).
Lastly, make sure you add new cases to the switch for your push button controls. This would simply mean you add something like...
case 101:
PrintFile( szFinalFile );
...if push button 101 corresponds with a print image.
Additional Information
For more information on InstallScript custom dialogs, see the Help topic Using InstallScript to Implement Custom Dialogs
Was this helpful?
Related Articles
How to change the default position of Installscript dialogs 3Number of Views Hiding or Moving a Control in an InstallScript Project Dialog 4Number of Views Bad Grammar in InstallScript Dialog String 3Number of Views InstallScript: Add Text to Uninstall Dialog 3Number of Views Make a Copy of an Existing InstallScript Dialog 3Number of Views
Revenera Assistant
Online
Hi, I am Reva - Ask me anything.
Updates
No new updates
Chat
Home
Updates
/**/
Thanks for the feedback!
Your feedback has been saved.Rate this response:
1
2
3
4
5
Add Additional feedback ( Optional )
0/240
English
English
Language changed successfully
Something went wrong
Email sent successfully
Something went wrong
Case create successfully
Are you sure you want to cancel
the case creation?
Please select a product to submit the case.
Please select a product version to submit the case.
0/255
Upload Attachment
File Upload
Maximum file
size allowed is 3 MB.
File type
not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
Are you sure you want to cancel the case creation?
Case closed successfully
File Upload
Maximum file size allowed is 3 MB.
File type not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
File Upload
Maximum file
size allowed is 3 MB.
File type
not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
© 2026 Flexera Software. All Rights Reserved.
Case id: 00001065
Activity: Status change: 2 hours ago