Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » CExtLabel flickering when updated repeatedly Collapse All
Subject Author Date
Adrian M Apr 1, 2005 - 8:32 AM

I am using a CExtLabel derived class on a status control to show values of certain variables in real time. Every time it is updated, you can see the background and the text being repainted (sometimes less than others), which for the frequency of 4 updates per second makes a quite bad visual impression. Any way I could make the update smoother?


Thanks,


Adrian

Adrian M Apr 2, 2005 - 12:10 AM

I tried to use CExtWFF< MyCExtLabel > instead of the MyCExtLabel and it works and it doesn’t seem to flicker any more, but the background is no longer painted based on the current paint manager and text color effects don’t work any more. Any suggestions?

Thank you,

Adrian

Technical Support Apr 3, 2005 - 12:06 PM

We may guess that you are using the CExtLabel class based window on a dialog. Please check whether this dialog has WS_CLIPCHILDREN turned on. The standard label control is based on the background its parent window. This makes it unacceptable when its text is changed and the read-only edit is often used instead. You can use the CExtLabel class but its parent window should clip child windows.

Adrian M Apr 4, 2005 - 10:01 AM

I am using this control in the same way it’s used in the StatusPanes sample and not in a dialog box. I have an MDI app and each of the MDI children frames has a status bar with sevaral CExtLabel derived panes. The flickering occurs when I change the text in the label control itself and not in the parent window, so WS_CLIPCHILDREN will not help. If I use a plain static text the flickering is practically inexistent. I also have another control which uses double buffering for painting and that one obviously doesn’t have any flickering.


Also, when the label control is set repeatedly with a relatively high frequency, the text ignores the color I set and uses black, and only when I stop setting the text in the control, the color becomes the one I had originally set


Adrian

Technical Support Apr 4, 2005 - 12:22 PM

We cannot yet reproduce the problem you are reporting. We tried to change the label text ten times a second and what we did see was minor flickering of the entire status bar but not the specific pane. It would be great if you send us a sample project that shows this problem. And the question arises whether you use the label control only for showing its text in a different color? If yes, we can advise you to set the text in an ordinary status pane and override the CExtStatusControlBar::OnQueryPaneTextColor virtual method to specify the custom color.

Adrian M Apr 18, 2005 - 12:08 AM

In my CExtStatusControlBar derived class I overrode OnQueryPaneTextColor as you indicated, but this method is never called, and this the text color is never updated.


I am using the standard CStatusBar::SetPaneText to set the text.


Any suggestion how I could fix this?


Thanks,


Adrian

Technical Support Apr 18, 2005 - 11:45 AM

We cannot confirm this bug. We should notice that the CExtStatusControlBar::OnQueryPaneTextColor() virtual method is called only if the CExtStatusControlBar::m_bCompleteRepaint property is set to true. Please make sure you did not set this property to false in your CExtStatusControlBar-derived class.