Click here to Skip to main content
12,457,938 members (51,607 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C++ VisualC++
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 7-Dec-12 23:37pm
Kumar 091.2K
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

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

Solution 1

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()[^]
  Permalink  
v3

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.160826.1 | Last Updated 11 Dec 2012
Copyright © CodeProject, 1999-2016
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