Click here to Skip to main content
13,000,742 members (39,216 online)
Rate this:
Please Sign up or sign in to vote.
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 20-Aug-12 23:28pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170624.1 | Last Updated 21 Aug 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100