Replacing the headerimage with each page
Hey guys. I'm writing a custom UI for an installer which has 6 steps. We're using ExperienceUI and a custom skin that I've put together for which the code is shown below. I have also used Resource Hacker to go under the UI.exe file included in Contrib\ExperienceUI\UIs to edit the sizes of the graphics and the layering of items so that I can put my background skin in the installer and completely customize the look and feel.
What I want to do is replace the header image that is declared below during each step of the process and show a Step 1, Step 2, Step 3 graphic on each step.
Can this be done? How is it done? I've tried several redraw methods as well as show and hides. Can someone please shed some light on how this works? Thanks!
Here is the NSI functions we're using to invoke the pages
Function Page1
!insertmacro XPUI_INSTALLOPTIONS_DISPLAY "Page1.ini"
FunctionEnd
Function Page2
!insertmacro XPUI_INSTALLOPTIONS_DISPLAY "Page2.ini"
FunctionEnd
Here is the SKIN that I'm using.
!define XPUI_CUSTOMSKIN
!insertmacro XPUI_DEFAULT XPUI_TEXT_COLOR 000000
!insertmacro XPUI_DEFAULT XPUI_TEXT_BGCOLOR FFFFFF
!insertmacro XPUI_DEFAULT XPUI_TEXT_LIGHTCOLOR FFFF00
!insertmacro XPUI_DEFAULT XPUI_HEADERIMAGE "${XPUI_SYSDIR}\Skins\MySkin\header-step1.bmp"
!insertmacro XPUI_DEFAULT XPUI_BOTTOMIMAGE ""
!insertmacro XPUI_DEFAULT XPUI_UNBOTTOMIMAGE ""
!insertmacro XPUI_DEFAULT XPUI_BOTTOMIMAGE_BMP "${XPUI_SYSDIR}\Skins\MySkin\footer.bmp"
!insertmacro XPUI_DEFAULT XPUI_HEADERIMAGE_NORESIZETOFIT ""
!insertmacro XPUI_DEFAULT XPUI_BOTTOMIMAGE_NORESIZETOFIT ""
!insertmacro XPUI_DEFAULT XPUI_UNHEADERIMAGE_NORESIZETOFIT ""
!insertmacro XPUI_DEFAULT XPUI_UNBOTTOMIMAGE_NORESIZETOFIT ""
!insertmacro XPUI_DEFAULT XPUI_ICON "${XPUI_SYSDIR}\Skins\MySkin\Icon.ico"
!insertmacro XPUI_DEFAULT XPUI_UNICON "${XPUI_SYSDIR}\Skins\MySkin\UnIcon.ico"
!ifdef XPUI_PAGE_BGIMAGE
!insertmacro XPUI_DEFAULT XPUI_PAGE_BGIMAGE_BMP `${XPUI_SYSDIR}\Skins\MySkin\blank.bmp`
!insertmacro XPUI_DEFAULT XPUI_LEFTLOGO `${XPUI_SYSDIR}\Skins\MySkin\blank.bmp`
!insertmacro XPUI_DEFAULT XPUI_UNLEFTLOGO `${XPUI_SYSDIR}\Skins\MySkin\blank.bmp`
!insertmacro XPUI_DEFAULT XPUI_LEFTLOGO_NORESIZETOFIT `${XPUI_SYSDIR}\Skins\MySkin\blank.bmp`
!else
!insertmacro XPUI_DEFAULT XPUI_LEFTLOGO `${XPUI_SYSDIR}\Skins\MySkin\middle.bmp`
!insertmacro XPUI_DEFAULT XPUI_UNLEFTLOGO `${XPUI_SYSDIR}\Skins\MySkin\middle.bmp`
!insertmacro XPUI_DEFAULT XPUI_LEFTLOGO_NORESIZETOFIT `${XPUI_SYSDIR}\Skins\MySkin\middle.bmp`
!endif
!macro XPUI_SET_BG
!macroend
!macro XPUI_BGFILES_DELETE
!macroend