Click here to Skip to main content
15,896,154 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Now i need to process a button's mouseup and mousedown event alone.
I has tried to use preTranslateMessage ,but when running the dailog ,the forms had no response.I want to use class derived from CButton to process the event,but i don't know how to do it.
Does somebody konw it?Please help me,Thank you very much.
Posted

1 solution

If you want to process the click event on a button, then you should proceed on that by right click the button and adding an event handler (i.e. click). I can't remember it properly, but I think that if you double click the button the event handler is automatically created for you...

If you want to control the mouse buttons, then you can filter the messages WM_LBUTTONDOWN[^],WM_RBUTTONDOWN...

Hope this helps.

Good luck.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900