Menu

#286 MUI setting for transparent header labels

2.0 Series
closed
Modern UI (30)
5
2006-03-14
2006-03-11
realthunder
No

I am using MUI NSIS 2.15 on XP.

When a static control is set to be transparent, it is
not redraw correctly when the text content is
changed. The new text and old text are overlaid.

I wonder how NSIS achieves transparent control. Using
WM_CTLCOLOR? Simply ignore the background redraw?
Then the problem makes sense. It doesn't erase the
old content. I think the proper way to achieve
transparency is to use WS_EX_TRANSPARENT. But,
anyway, that style is also problematic. The easiest
way to fix this problem is to hide the window, change
the text, and show the window again. I made some
change to MUI to do that.

Or, any better idea?

Discussion

  • Amir Szekely

    Amir Szekely - 2006-03-11

    Logged In: YES
    user_id=584402

    SetCtlColors sets the return value of WM_CTLCOLOR for a
    control. If you choose transparent, it'll return a hollow
    brush. If you set a control to transparent and update the
    text, it's up to you to update the window as well, either by
    hiding and showing it or by calling UpdateWindow with System.

    Is your problem with the MUI itself where you set some
    control of the MUI with transparent background and get this
    problem? Maybe a define for the MUI saying "clean before
    setting text" would do. Or you could just update the
    appropriate controls in the show function of the page.

     
  • realthunder

    realthunder - 2006-03-13

    Logged In: YES
    user_id=1403667

    Yes, it's true. I stretch the header image to occupy the
    whole title region. So, I need the title text to be
    transparent. Patching MUI is much easier. Or else, I have
    to add custom function for all pages.

     
  • Amir Szekely

    Amir Szekely - 2006-03-14
    • labels: 458221 --> Modern UI
    • milestone: 378423 --> 2.0 Series
    • assigned_to: nobody --> kichik
    • summary: Transparent static control not update properly --> MUI setting for transparent header labels
     
  • Amir Szekely

    Amir Szekely - 2006-03-14
    • status: open --> closed
     
  • Amir Szekely

    Amir Szekely - 2006-03-14

    Logged In: YES
    user_id=584402

    I've added MUI_HEADER_TRANSPARENT_TEXT which causes the MUI
    to use SetCtlColors transparent on the header's label
    controls and refresh them after setting the text.

     

Log in to post a comment.