StatusBar flickers badly. Any ideas?

Started by Elias Montoya, June 04, 2009, 05:36:19 PM

Previous topic - Next topic

Elias Montoya


Im not doing anything special, just setting text to it using FF_StatusBar_SetText()

The text might change up to 5 times per second, and it flickers like controls do when
dialog is resized without the WS_CLIPCHILDREN style.

TechSupport

Hi Elias,

I don't see any flicker (I'm testing on Vista).

However, you may want to create a second SetText function to test. The original one below should be modified to remove the refresh of the entire statusbar.

Original:

Function FF_StatusBar_SetText (ByVal hStatus As Dword, ByVal iPart As Dword, ByVal sText As String, Opt ByVal uType As Dword) As Dword
   Function = SendMessage (hStatus, %SB_SETTEXT, iPart Or uType, ByVal StrPtr(sText))
   InvalidateRect hStatus, ByVal %Null, %TRUE
   UpdateWindow hStatus
End Function


New test version:

Function FF_StatusBar_SetText (ByVal hStatus As Dword, ByVal iPart As Dword, ByVal sText As String, Opt ByVal uType As Dword) As Dword
   Function = SendMessage (hStatus, %SB_SETTEXT, iPart Or uType, ByVal StrPtr(sText))
End Function


Elias Montoya

#2
 Flicker was reduced to an acceptable level. Almost completely gone. :)

However, it still flickers when dialog is resized. Im using Windows XP, SP3.

Thanx Paul.