Solved

Flickering Button on CToolBar

Posted on 2006-10-30
4
375 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
0
Comment
Question by:rickatseasoft
  • 2
4 Comments
 
LVL 22

Assisted Solution

by:mahesh1402
mahesh1402 earned 250 total points
Comment Utility
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
0
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 250 total points
Comment Utility
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?
0
 

Author Comment

by:rickatseasoft
Comment Utility
No redrawing or anything.

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

Rick
0
 

Author Comment

by:rickatseasoft
Comment Utility
I'll just clean this up and award points for effort.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now