Solved

Hot buttons

Posted on 1998-05-06
3
200 Views
Last Modified: 2013-11-20
I recently created a series of buttons derived from CBitmapButton and assigned custom bitmaps to handle up, down, hot and disabled states. But it seems that the hot one does not work properly. Maybe I missed something ?
0
Comment
Question by:fmichaud061597
[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
3 Comments
 
LVL 7

Expert Comment

by:galkin
ID: 1308028
What exactly doesn't work properly?
0
 

Author Comment

by:fmichaud061597
ID: 1308029
When my mouse pointer go over my buttons, nothing happens. Normally it is supposed to display my hot bitmap.
0
 
LVL 7

Accepted Solution

by:
galkin earned 20 total points
ID: 1308030
Cbitmapbutton contains 4 bitmaps. One is for normal, "up" state when button doesn't have focus. Two is when button has focus. Three is when button is pushed. Four is for disabled state. When you move mouse pointer over the button button state doesn't change so that bitmap is not changed. Focus can be moved to the button using TAB key. If you want to change button bitmap you need to handle WM_MOUSEMOVE message, set capture when first WM_MOUSEMOVE is received change bitmap. Then when mouse pointer has left button you should release capture, restore button bitmap. You can also take advantage from _TrackMouseEvent function that would notify you when mouse pointer enters and leaves button.

0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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 is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

729 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