Thursday, May 5, 2011

How to implement CTRL-A key combination in C++

I want to implement some action when CTRL-A is pressed . How can I do this in C++ on Windows Platform . I am using VS 2005 .

Any pointers will help.

From stackoverflow
  • You need to define a Keyboard Accelerator table in your resources, and then make sure you call TranslateAccelerator in your message loop. See MSDN for full details.

    If you're using a framework (eg. MFC) then it will have its own way of wrapping accelerators - you need to look them up in the documentation of the framework you're using.

  • You absolutely don't need accelerator and above code has no sense at all.
    Simply use HK. See MSDN and Google groups for basic code (Win32)

0 comments:

Post a Comment