Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Flickering Button on CToolBar

Posted on 2006-10-30
4
Medium Priority
?
391 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 750 total points
ID: 17839960
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 45

Accepted Solution

by:
AndyAinscow earned 750 total points
ID: 17840244
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
ID: 17843681
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
ID: 17888342
I'll just clean this up and award points for effort.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

810 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