Click here to Skip to main content
15,030,954 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

How to work with clipboard mouse events like cut, copy, paste, delete and rename using VC++ or C++.

I was succesfull in performing these events using keyboard hooks.I have used virtual keys VK_CONTROL,VK_DELETE etc..

So i have trapped these events and stoped performing this events.So in the same way how can i do the same thing for the mouse.Can any one guide me to do this.I am feeling difficulty in finding the Copy,cut,paste,delete events from mouse right click(Using Mouse Hooks).

Thanks in Advance
Posted
Comments
Philippe Mori 8-Dec-12 8:52am
   
I think you won't be able to do that at that level. At most, you might be able to handle contextual menu.
Kumar 09 8-Dec-12 21:13pm
   
Not for within the Application but for the Windows.

1 solution

Check the hook functions...
http://msdn.microsoft.com/en-us/library/windows/desktop/ms644990%28v=vs.85%29.aspx[^]
Note : Fourth parameter should be 0 to make the hook global
and

http://msdn.microsoft.com/en-us/library/windows/desktop/ms644986%28v=vs.85%29.aspx[^]

Also there is an excellent article on codeproject itself...

Your Desktop and Microsoft's SetWindowsHookEx()[^]
   
v3

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