[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

CStatic and SetBitmap

Posted on 1998-09-09
2
Medium Priority
?
916 Views
Last Modified: 2013-11-20
Hi,

I'm trying to make a dialog just like the one you get when you insert the Visual Studio disc into the CD driver

I'm using CStatic for "button" which is actually only a bitmap.
I'm using OnMouseMove and can recognize if the mouse pointer is on a "button" or not and if it is, I'm using SetBitmap to change
the "button's" bitmap.

The problem is that some times, not always !, there change between the bitmaps is not smooth and there is a flickering effect.

My questin is, can I avoid this ??

Thanks in advance

Israel
0
Comment
Question by:israel022697
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
prasanth earned 100 total points
ID: 1321972
Try using a CBitmapButton instead.
0
 
LVL 7

Expert Comment

by:psdavis
ID: 1321973
Just using CBitmapButton won't completely help you.  It will only let you define focus/non-focus/down/disabled bitmaps, but they are relatively flicker free.  

The only way to use a CBitmapButton is to physically change the button from a 'up' bitmap to a 'focus' bitmap when moved over.

Now the trick is to override the CBitmapButton and replace it with your own function.  When you move the mouse over a button, you'll want to delete the old bitmap image and load up the new image.  Take a look at the CBitmapButton source code and you'll see that all you have to do.  A quickie rememberance is take the 'up' bitmap, do a DeleteObject on it, load it back up with a LoadBitmap, and the button should update itself 'hopefully' cleanly.  

I have some code up at work that will help you, but I'm not there right now.

Phillip
0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
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.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

649 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