Progress status text overlayed

Apr 11, 2013 at 2:57 PM
I'm loving your custom BA, but I do have a problem. I've been getting overlayed text but only on the progress page when the progress updates. It's apparently not refreshing the window until the page changes so I see this:

Image

I have added this code, in order to force it to refresh, after the ThemeSetTextControl call in OnProgress, but it doesn't seem to have any impact.
::InvalidateRect(m_hWnd,NULL, TRUE);
::UpdateWindow(m_hWnd);
This issue is, of course, affecting everywhere the progress page is used (install, repair, uninstall).

Everything works, functionally, but this one display issue.
Coordinator
Apr 11, 2013 at 5:25 PM
I have never seen that before, is that with the HTML or RTF BA? Do you see the same problem with the standard ones?
Apr 11, 2013 at 8:56 PM
I have rebuilt my bootstrapper using both WixStandardBootstrapperApplication.HyperlinkLicense and WixStandardBootstrapperApplication.RtfLicense and the text on the progress page works just fine.

The above example of the overlayed text uses WixExtendedBootstrapperApplication.HyperlinkLicense.
Apr 11, 2013 at 8:58 PM
To give a little further clarification, the blue you see in the background behind the text is from an image, not a solid background color - could that have something to do with it? I have an image that is a "full screen" background for all pages, so all the text on all pages have an image behind them - the progress page just happens to be the only one that gets refreshed/updated after it is originally painted.
Coordinator
Apr 11, 2013 at 9:04 PM
That probably has something to do with it, is that code you could share so I can take a look?
Apr 11, 2013 at 9:16 PM
Edited Apr 12, 2013 at 2:22 PM
Here is the wxs:
<BootstrapperApplicationRef Id="WixExtendedBootstrapperApplication.HyperlinkLicense">
    <bal:WixExtendedBootstrapperApplication 
            LicenseUrl="http://localhost/terms-of-service/" />

            <Payload Name='thm.xml'  Compressed='yes' SourceFile='!(wix.WixStdbaThemeXml=Theme.xml)' /> 
            <Payload Name='thm.wxl'  Compressed='yes' SourceFile='!(wix.WixStdbaThemeWxl=Theme.wxl)' /> 
            <Payload Name='WindowsLoader_GeneralPageBackground.jpg' Compressed='yes' SourceFile='$(sys.SOURCEFILEDIR)WindowsLoader_GeneralPageBackground.jpg' /> 
            <Payload Name='WindowsLoader_ProgressBarBackground.jpg' Compressed='yes' SourceFile='$(sys.SOURCEFILEDIR)WindowsLoader_ProgressBarBackground.jpg' /> 
            
</BootstrapperApplicationRef>
I have two packages in the chain, an MSI package and an EXE package. The MSI is required, the EXE is installed if a checkbox is selected by the user on the Install page (this is the main reason why I wanted your BA extension)

Here is the Progress page from the Theme.xml:
<Page Name="Progress">
    <Text X="80" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Title)</Text>
    <Image X="0" Y="0" Width="600" Height="450" ImageFile="WindowsLoader_ProgressBarBackground.jpg"/>
    <Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ProgressHeader)</Text>
    <Text X="11" Y="141" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Text>
    <Text Name="OverallProgressPackageText" X="85" Y="141" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Text>
    <Progressbar Name="OverallCalculatedProgressbar" X="11" Y="163" Width="-11" Height="15" />
    <Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
  </Page>
Nothing has changed here from your Bundle4Theme, except the image file name. This is the full-screen background image.

Here is the customization I made to your WixBalExtensionExt.dll source (same thing results regardless of this change, so I reverted it and went back to using the dll that you put in the non-source distribution zip):
virtual STDMETHODIMP_(int) OnProgress(
        __in DWORD dwProgressPercentage,
        __in DWORD dwOverallProgressPercentage
        )
    {
        WCHAR wzProgress[5] = { };

#ifdef DEBUG
        BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: OnProgress() - progress: %u%%, overall progress: %u%%", dwProgressPercentage, dwOverallProgressPercentage);
#endif

        ::StringCchPrintfW(wzProgress, countof(wzProgress), L"%u%%", dwOverallProgressPercentage);
        ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_OVERALL_PROGRESS_TEXT, wzProgress);
        
        ThemeSetProgressControl(m_pTheme, WIXSTDBA_CONTROL_OVERALL_PROGRESS_BAR, dwOverallProgressPercentage);
        SetTaskbarButtonProgress(dwOverallProgressPercentage);


        ::InvalidateRect(m_hWnd,NULL, TRUE);
        ::UpdateWindow(m_hWnd);

        return __super::OnProgress(dwProgressPercentage, dwOverallProgressPercentage);
    }
If you need more code/examples, we can take this conversation to email.
Coordinator
Apr 12, 2013 at 6:52 AM
Would it be possible to get a copy of WindowsLoader_ProgressBarBackground.jpg. I'll take a look at this over the next few days, it sounds like it could be a WiX bug.
Apr 12, 2013 at 2:28 PM
Sent via email.

Thanks
Coordinator
Apr 12, 2013 at 3:41 PM
Using your image I am unable to reproduce the problem but on my version the text background is white not transparent like in the image above. Did you make any other change to get this transparent effect? I suspect that is what is causing the problem.
Apr 12, 2013 at 3:51 PM
The font I'm using for the OverallProgressPackageText does not specify a background color, which makes it transparent.
<Font Id="3" Height="-12" Weight="500" Foreground="000000" >Segoe UI</Font>
I can try it with an explicit background color and see if that fixes it.
Coordinator
Apr 12, 2013 at 4:07 PM
It is that that is causing it, what I don't know yet is what the other text is.
Apr 12, 2013 at 4:21 PM
Yes, adding a background color to the font fixes the issue. No overlapping text.

It still seems like a bug in WIX that a font with a transparent background does not get refreshed/repainted correctly. But at least my problem is solved. Thanks for your time.
Coordinator
Apr 12, 2013 at 4:49 PM
As a quick fix you could set the text for "OverallProgressPackageText" to nothing, you won't get the "Initializing..." text but it might look better.
Coordinator
Apr 12, 2013 at 5:27 PM
It doesn't look like it is an easy fix, a static control doesn't erase properly with some more evolved code - I am guessing that is why the font has the background colour set for those controls.
Apr 12, 2013 at 7:30 PM
For my case, I just moved the progress bar and the labels down a little bit and was able to use a solid color to match the background and it worked. For someone that has a textured background, that solution wouldn't work and defaulting the text to nothing might solve the problem. However, if you have multiple items in your chain, it would start overlaying text as soon as the second item starts installing.
Dec 13, 2013 at 4:33 PM
Edited Dec 13, 2013 at 8:40 PM
I am seeing this issue also. I am using a background image that has a gradient, so setting the background color for the fonts won't work. In a possibly related issue, I am actually using the GUI of the items in my chain using DisplayInternalUI="yes" on the MSIPackage object, and it appears as though the text, and even some of the other GUI elements, like the progress bar, of the chained msi UI is bleeding over onto the progress page of the main ui.
Coordinator
Dec 15, 2013 at 12:59 PM
I am afraid I never found a fix for this, this UI is fairly basic if you need more functionality I would suggest using a managed BA.