Using Windows Virtual Keys

This is a discussion on Using Windows Virtual Keys within the Windows Programming forums, part of the Platform Specific Boards category; Hey, I can't figure out how you would use the vk's to get a common short cut, like ctrl+v. The ...

  1. #1
    Registered User IdioticCreation's Avatar
    Join Date
    Nov 2006
    Location
    Lurking about
    Posts
    225

    Using Windows Virtual Keys

    Hey,

    I can't figure out how you would use the vk's to get a common short cut, like ctrl+v. The virtual key for control is just VK_CONTROL, but letters don't have vk's. Should I be doing this a different way?

    Thanks
    If you take something apart and put it back together enough times, you will eventually have enough parts left over to build a second one.

  2. #2
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    It just so happens that the virtual key codes for 0 - 9 and A - Z correspond to their ASCII codes.

    0 --> '0' = 0x30
    1 --> '1' = 0x31
    ...
    A --> 'A' = 0x41
    B --> 'B' = 0x42
    ...

    If for example it's an edit control, it's window procedure will recieve messages like WM_PASTE, WM_CUT, WM_UNDO. There are also keyboard accelerators which are like 'shortcuts' http://msdn2.microsoft.com/en-us/library/ms645526.aspx

    ╔╗╔╦══╦╗╔╦══╦╗
    ║╚╝║╔╗║╚╝║╔╗║║
    ║╔╗║╠╣║╔╗║╠╣╠╣
    ╚╝╚╩╝╚╩╝╚╩╝╚╩╝

    codez http://code.google.com/p/zxcvbn/

  3. #3
    Registered User IdioticCreation's Avatar
    Join Date
    Nov 2006
    Location
    Lurking about
    Posts
    225
    Thanks, your very helpful you know that.
    If you take something apart and put it back together enough times, you will eventually have enough parts left over to build a second one.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Virtual Keys
    By silentkarma in forum Windows Programming
    Replies: 2
    Last Post: 09-15-2006, 05:19 PM
  2. abstract class
    By xddxogm3 in forum C++ Programming
    Replies: 5
    Last Post: 01-01-2005, 08:08 AM
  3. virtual keys, while loop, movement
    By PHP in forum C++ Programming
    Replies: 3
    Last Post: 12-24-2002, 01:57 PM
  4. How do you toggle keys like Scroll lock without Windows API?
    By animeaholic in forum C++ Programming
    Replies: 7
    Last Post: 09-15-2002, 07:02 PM
  5. Exporting Object Hierarchies from a DLL
    By andy668 in forum C++ Programming
    Replies: 0
    Last Post: 10-20-2001, 01:26 PM

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