Setting a control on the Success page?

Jan 15 at 11:01 PM
Edited Jan 15 at 11:01 PM
I have a Hypertext control element in my theme on the SUCCESS page which I only want to show if the user has checked a checkbox on the INSTALL page:

<Hypertext Name="SystemSuccessText" X="185" Y="91" Width="-11" Height="64" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.SuccessSystemMessage)</Hypertext>

I thought I could achieve this with one of the bafunctions hooks by setting SystemSuccessTextState appropriately (to "enable" or "disable" based on the checkbox value).

But after realizing it wasn't working as expected, I had a dig through the source code (, in particular the OnChangeState() function and noticed the _*State_ control changes are only applied on the INSTALL, OPTIONS and MODIFY pages.

Is there a reason that we can't set the state of controls on the SUCCESS page via this method? Is there some kind of workaround for this?

Jan 15 at 11:19 PM
Edited Jan 15 at 11:19 PM
I went ahead and added the extra line in OnChangeState() to apply the control state changes to the SUCCESS page, recompiled, and it now works exactly as I wanted:

Here is the snippet:
                    if ((m_rgdwPageIds[WIXSTDBA_PAGE_INSTALL] == dwNewPageId ||
                         m_rgdwPageIds[WIXSTDBA_PAGE_OPTIONS] == dwNewPageId ||
                         m_rgdwPageIds[WIXSTDBA_PAGE_SUCCESS] == dwNewPageId ||
                         m_rgdwPageIds[WIXSTDBA_PAGE_MODIFY] == dwNewPageId) &&
                         pControl->sczName && *pControl->sczName)
Unless I'm overlooking something, perhaps this could be an official change? (as well as the FAILURE page too).