tags:

views:

45

answers:

2

Can any body tell me how to detect Ctrl+C in MFC or VC++??

Is Accelerator Helpful in SDI application to detect Ctrl+C?? How?

+1  A: 

Add an accelerator for Ctrl-C to the Accelerator table in your application resources, and map it to a command ID. In your SDI window, handle that command ID and perform whatever action you wand in the command handler.

Simon Steele
i have done that but it doesn't work
onlybj
Do other accelerators work? If others work and it's just Ctrl-C, try handling ID_EDIT_COPY or similar - it may be you're getting some default accelerators from somewhere.
Simon Steele
A: 

The GetAsyncKeyState Function can be used to determine if the Control key was pressed during an event. Also the Shift key, Alt key and which one was pressed - left or right.

HTH

At the bottom of the link are more very useful links, please see them. :-)

JustBoo