Thread: What is the key code?

  1. #1
    The Defective GRAPE Lurker's Avatar
    Join Date
    Feb 2003
    Posts
    949

    What is the virtual key code?

    I tried VK_+ and '+' (along with the - counterpart) but neither works. What are the virtual key codes for the plus and minus signs? Thanks !
    Last edited by Lurker; 10-06-2003 at 06:51 PM.
    Do not make direct eye contact with me.

  2. #2
    VK_SUBTRACT and VK_ADD. Your compiler has no help files? Try MSDN for this kind of thing as well.

    For instance, here.
    "There's always another way"
    -lightatdawn (lightatdawn.cprogramming.com)

  3. #3
    The Defective GRAPE Lurker's Avatar
    Join Date
    Feb 2003
    Posts
    949
    Thanks.
    Do not make direct eye contact with me.

  4. #4
    The Defective GRAPE Lurker's Avatar
    Join Date
    Feb 2003
    Posts
    949
    Ahh, sorry. I meant the + and - used with the underscore and = keys next to backspace. And my compiler does not have anything regarding to it.
    Do not make direct eye contact with me.

  5. #5
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    ummm... those would be the virtual codes for - and =, with a shift on the =
    Away.

  6. #6
    The Defective GRAPE Lurker's Avatar
    Join Date
    Feb 2003
    Posts
    949
    Hmm.....not on my computer .
    Do not make direct eye contact with me.

  7. #7
    >Hmm.....not on my compute

    Yes, on every computer. Thats the point of the virtual key. confuted is correct. Check 'underscore' for 'minus' and then differentiate between the two by checking for 'SHIFT'. Same for 'plus', check 'equals' then check for 'shift'.
    "There's always another way"
    -lightatdawn (lightatdawn.cprogramming.com)

  8. #8
    It couldn't be defined as VK_+ because it would think you are trying to add VK_ with something else. Did your compiler ask for a r-value?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. About aes
    By gumit in forum C Programming
    Replies: 13
    Last Post: 10-24-2006, 03:42 PM
  2. Window message loop (Keys)
    By Blackroot in forum Windows Programming
    Replies: 3
    Last Post: 09-12-2006, 05:15 PM
  3. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 10:00 AM
  4. Obfuscated Code Contest
    By Stack Overflow in forum Contests Board
    Replies: 51
    Last Post: 01-21-2005, 04:17 PM
  5. << !! Posting Code? Read this First !! >>
    By kermi3 in forum Windows Programming
    Replies: 0
    Last Post: 10-14-2002, 01:29 PM