This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Changing bitmap on the fly
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 08, 2008
03:19 PM
Changing bitmap on the fly
I know it's been asked before but haven't seen a response yet. When in doubt, just ask it again. 🙂
First off, this is an InstallScript project.
If I add a bitmap control to a dialog, I can point to the image I want to use during design time and everything is hunky-dory.
However, I want to be able to change this image based on a choice that the user selects on a previous screen (customer chooses 'A', load this image, else load other image) during run-time.
Is there a way to do this on the fly? I know you can do stuff with CtrlSetText, but obviously that's for text boxes.
First off, this is an InstallScript project.
If I add a bitmap control to a dialog, I can point to the image I want to use during design time and everything is hunky-dory.
However, I want to be able to change this image based on a choice that the user selects on a previous screen (customer chooses 'A', load this image, else load other image) during run-time.
Is there a way to do this on the fly? I know you can do stuff with CtrlSetText, but obviously that's for text boxes.
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 09, 2008
02:10 PM
It is possible to specify an alternate image for dialogs by using the DialogSetInfo function and passing DLG_INFO_ALTIMAGE for the nInfoType parameter. Note this only affects dialogs with a bitmap control using control ID 1200 (which is used by the banner image on interior panel dialogs and the InstallShield setup icon on exterior panel dialogs). It is not possible to dynamically change bitmaps for any other controls.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 09, 2008
03:04 PM
Apart from the banner bitmap that Josh describes, if you have a small, fixed set of images, you can add them in overlapping bitmap controls, and then use the ShowWindow API function to show the correct one and hide the others...
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)