PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Robert Eaton on January 03, 2010, 05:01:30 PM

Title: Toolbar Flicker
Post by: Robert Eaton on January 03, 2010, 05:01:30 PM
Is there a way to improve the toolbar flicker when a form is resized?

Title: Re: Toolbar Flicker
Post by: Paul Squires on January 03, 2010, 05:23:12 PM
Are you sure it is toolbar flicker and not statusbar flicker? I don't see toolbar flicker, but statusbars do flicker because panel sizes in the statusbar are recalculated and displayed during resize.

Are you displaying other things in your WM_SIZE handler and not taking into account the height of the toolbar and any statusbars on the form?

Title: Re: Toolbar Flicker
Post by: Robert Eaton on January 03, 2010, 05:30:01 PM
Paul,
Here is a sample project that displays the flicker. It only has a toolbar with some icons attached to the buttons.
No code in the project at all.


Title: Re: Toolbar Flicker
Post by: Paul Squires on January 03, 2010, 05:46:25 PM
Hi Robert,

Okay, I see the flicker. It did not show very well on my Windows 7 but under the WinXP mode it does flicker. The reason is that FireFly outputs code in the FORM1_FORMPROCEDURE to automatically resize toolbars and statusbars when the form size changes. Here is the code directly from your sample project:


    ' Handle the sizing of any toolbars/statusbars
    If wMsg = %WM_SIZE Then                     
        ' Resize the toolbar if one is present
        If wParam <> %SIZE_MINIMIZED Then
           If IsWindow( GetDlgItem(hWndForm, IDC_FORM1_TOOLBAR1) ) Then
              SendMessage GetDlgItem(hWndForm, IDC_FORM1_TOOLBAR1), wMsg, wParam, lParam
           End If
        End If
    End If       


Without the above code, the toolbar will not extend to the right edge of the form whenever the form size changes. Maybe that is goo, maybe it is not. In my eyes, I would prefer to have the toolbar extend to the right edge.
Title: Re: Toolbar Flicker
Post by: Robert Eaton on January 03, 2010, 05:51:55 PM
Okay, that makes sense.

Thanks,
Bob
Title: Re: Toolbar Flicker
Post by: Thomas Cone Jr on January 03, 2010, 08:04:45 PM
goo ?
Title: Re: Toolbar Flicker
Post by: Paul Squires on January 03, 2010, 08:21:36 PM
:)   Should have been "good".
Title: Re: Toolbar Flicker
Post by: Cho Sing Kum on January 03, 2010, 10:01:53 PM
The toolbar will not flicker if you use a Rebar control for the Toolbar.

However, the Rebar height is too short and there is no option to change the height. The images, or texts if there are, are too near the bottom boundary.
Title: Re: Toolbar Flicker
Post by: Roger Garstang on January 03, 2010, 10:43:54 PM
There is also a Class Style for Redraw Vert/Horz that can help flicker too.  And, various combinations of Clip styles, etc.  Really helpful if Windows is setup to display window when sizing/dragging instead of the outline.