|
-
September 19th, 2006, 09:53 AM
#1
Help me with WM_LBUTTONUP\DOWN
Hi,
The purpose is the following. I have a button IDC_MYBUTTON. I want to handle two separate events: the first when the user pushes the button and then the second - when he releases it. Please help me to do that.
I tried to use WM_LBUTTONUP and WM_LBUTTONDOWN for the dialog which contains the button. But somehow it just doesn't execute the handlers when the user presses the button! It executes the handlers only when the user clicks on the dialog somewhere outside the button...
-
September 19th, 2006, 10:11 AM
#2
Re: Help me with WM_LBUTTONUP\DOWN
You will have to subclass the button in order to trap mouse down and up events.
Regards,
Ramkrishna Pawar
-
September 19th, 2006, 10:17 AM
#3
Re: Help me with WM_LBUTTONUP\DOWN
It sounds as though you're implementing the right handlers - but for the wrong object...! Make sure that you've implemented them for the button object and not some other object, such as the main window. Also, check that you haven't inadvertently mapped the notify message, instead of the message itself. The notify message would be WM_NCLBUTTONDOWN in this particular case.
"A problem well stated is a problem half solved.” - Charles F. Kettering
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|