Handling ctrl+<key>

This is a discussion on Handling ctrl+<key> within the Windows Programming forums, part of the Platform Specific Boards category; hey, for like cut / copy / paste, you can usually use ctrl+<key> but i dont know how to handle ...

  1. #1
    Shibby willc0de4food's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    378

    Handling ctrl+<key>

    hey, for like cut / copy / paste, you can usually use ctrl+<key> but i dont know how to handle those cases so does anyone know of a resource or can anyone explain how? thanks
    Registered Linux User #380033. Be counted: http://counter.li.org

  2. #2
    Registered User
    Join Date
    Mar 2005
    Posts
    76
    This can be done with accelerators and TranslateAccelerator:

    http://msdn.microsoft.com/library/de...ccelerator.asp

  3. #3
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Another possible solution is PreTranslateMessage().

    Kuphryn

  4. #4
    Shibby willc0de4food's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    378
    thanks

    is PreTranslateMessage MFC?

    i just read some on the msdn site so this may be a stupid question but, do you know how it works? like, do i have to have that function process actions before going on to send the message or do i just need to load the accelerator or what? lol
    thanks for the help
    Registered Linux User #380033. Be counted: http://counter.li.org

  5. #5
    Registered User Joelito's Avatar
    Join Date
    Mar 2005
    Location
    Tijuana, BC, México
    Posts
    307
    Isn't easier like this:
    Code:
    case WM_KEYDOWN:
    {
    switch (wParam)
    {
    case VK_F1:
    {
    if(GetKeyState(VK_SHIFT))
    {
    // you press SHIFT + F1 !!!
    }
    break;
    }
    }
    return TRUE;
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. signal handling and exception handling
    By lehe in forum C++ Programming
    Replies: 2
    Last Post: 06-15-2009, 10:01 PM
  2. Handling critical errors
    By Memloop in forum C Programming
    Replies: 14
    Last Post: 03-26-2009, 06:14 AM
  3. event handling is serialized in MS Visual Studio C++ 2005 ??
    By mynickmynick in forum Windows Programming
    Replies: 3
    Last Post: 08-07-2008, 04:47 AM
  4. need help on error handling.
    By broli86 in forum C Programming
    Replies: 9
    Last Post: 06-19-2008, 11:55 AM
  5. Error handling
    By mepaco in forum C++ Programming
    Replies: 12
    Last Post: 09-06-2002, 10:45 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21