Solved

Hot buttons

Posted on 1998-05-06
3
195 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Expand LInux Boot partition remotly 3 85
sumNumber challenge 16 109
NotAlone Challenge 20 79
Annoying "thing" blocks my view 4 80
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: 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…
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 demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

929 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

10 Experts available now in Live!

Get 1:1 Help Now