We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

Flickering Button on CToolBar

rickatseasoft
on
Medium Priority
411 Views
Last Modified: 2013-11-20
I have a CToolBar that contains several owner draw buttons with Icons, 2 CComboBoxes, and one standard CButton.

On startup one CComboBox is empty, while the other is populated.  So long as the one CComboBox is empty, then one of the owner drawn CButtons flickers on mouse movement.  To stop the flicker, all I need to do is AddString("         ");

The problem is solved (by a work-around), unless there are latent problems, but it really has piqued my curiosity.

Any ideas??

Thanks in advance, Rick
Comment
Watch Question

mahesh1402IT Professional
Top Expert 2005
Commented:
I am not sure what kind of flickering problem you are facing.. is it your custom toolbar derived from CToolBar ?

to decrease toolbar you may try override OnEraseBackGround and return TRUE from function;

/* CMyToolBar inherit from standard CToolbar */

CMyToolBar::OnEraseBackground()
{
  return TRUE;
}


-MAHESH

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Freelance programmer / Consultant
CERTIFIED EXPERT
Commented:
I guess it is constantly being redrawn when the mouse moves.  Do you have some code doing an Invalidate() in response to a mouse event?

Author

Commented:
No redrawing or anything.

Remember that this is fixed entirely when a string is added to a CComboBox that is really a clistbox.

Rick

Author

Commented:
I'll just clean this up and award points for effort.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.