Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Hot buttons

Posted on 1998-05-06
3
Medium Priority
?
206 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 80 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

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…
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.
Integration Management Part 2

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