none
Outlook View Control flickers on WS_EX_COMPOSITED style RRS feed

  • Question

  • Outlook view control flickers when parent control has window style WS_EX_COMPOSITED

    This occurs in mail and calendar view, but only if Cursor is moved over titles of a day or over scrollbars.

    Does anybody have any experiences with later Outlook control Versions? I'm using Outlook 2010.

    I believe that Outlook control has some bugs here, and is drawing directly to DC outside of WM_PAINT.


    René Rössler

    Saturday, July 18, 2015 10:51 PM

All replies

  • Hi R.Roessler,

    What is your project type, and where you host Outlook view control? Could you share us steps to reproduce your issue? A window flickers because it gets erased before it's drawn. According to the link below, WS_EX_COMPOSITED implements double buffering.

    # CreateWindowEx function
    https://msdn.microsoft.com/en-us/library/ms632680%28VS.85%29.aspx?f=255&MSPPError=-2147217396

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, July 20, 2015 8:26 AM
  • Hi Moderator,

    this is an old but still running project in VB classic, but it does not depend on it, because there was no support for WS_EX_COMPOSITED as well, and all windows handling is done with Win32 api. Outlook view control is hosted as it is inside another child window where WS_EX_COMPOSITED is switched on. We are using this mode for alphablended semitransparency of other child controls. We are able to switch it on/off on demand, so with WS_EX_COMPOSITED switched on we get flickering, switched off we get normal behaviour.

    Outlook view control will be created inside of the child window where WS_EX_COMPOSITED is already set. So I see there no problem, and all other controls (i.e. MS HTML control, common controls) run with this mode perfectly.

    We switch to this mode in parent window with

            Style = GetWindowLong(wnd, GWL_EX_STYLE) Or WS_EX_COMPOSITED
            SetWindowLong wnd, GWL_EX_STYLE, Style

    So in this moment double buffering is activated for all child windows of this window. Unfortunately there is no way to tell windows, to do double buffering except an explicit (solid) child window, which should be drawn in standard mode. This would be a great deal, because I see many controls of third party not handling it. So if you declare WS_EX_COMPOSITED for a parent, you are in the cage, and all child windows have to handle WS_EX_COMPOSITED perfectly.

    Outlook control is flickering when cursor is moved over titles (i.e. Day titles or week titles, headlines of email list) or over an existing scrollbar or when scrollbar thumb is moved by mouse. Sometimes it will not display its content completely on first drawn, only after moving the cursor over it, and sometimes it stays in clearing the window and you'll see a white panel only.

    In our experiences this will happen commonly

    1) there is no correct handling of WM_PAINT itself. We have seen, that implementing scollbars via scrollbar controls is often resulting in a lot of WM_PAINT events, which also can be seen, when we subclass the Outlook view control container window. 

    2) It is often popular to draw directly to DC of the window in code. This is completely wrong when using double buffering mode, because all changes will be discarded, but, with releasing the DC, the window will be drawn by double buffer, and somehow erased only.

    Of course MS can say now, uuh, this is old developing software, but you will see, this problem will occure with any other developing software enabling WS_EX_COMPOSITED. The whole project is really hard to convert to .net.

    It would be a great pleasure to support you with further informations.


    René Rössler

    Tuesday, July 21, 2015 8:28 AM
  • Hi R.Roessler,

    Thanks for clearly. I am not familiar with VB, and I am not sure what your project is. I suggest you create a simple project with .VB.net. In the project, use Outlook View Control in a parent control which has window style WS_EX_COMPOSITED to check whether this issue exists. If it still exist, it would be helpful if you could share us steps or a simple project to reproduce your issue. If it did not appear, as you know, Vb is old, and at present, .net is more helpful, I suggest you convert your project to .net.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Tuesday, July 21, 2015 9:57 AM