Solved

Hot buttons

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

Industry Leaders: 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

Suggested Solutions

Title # Comments Views Activity
C++ BOOL WINAPI ReadFile fails on windows 10 when reading from USB cable 9 546
sameEnds challenge 3 194
tripleUp challenge 7 96
Sed question 2 139
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. …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

737 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