Thread: message loop VK_<key>

  1. #1
    Registered User
    Join Date
    Dec 2002
    Posts
    221

    message loop VK_<key>

    i tried going through the winuser.h, but cant find the defs for regular letters on the keyboard. is there something im missing?

  2. #2
    Registered User
    Join Date
    Jun 2003
    Posts
    245
    They are in there as normal ascii, but without any alternatives - for example, "A" and "a" are both 65. "0" and "!" are both 48 (0x30). etc...

    If you have the MSDN installed, then look here for a full list:
    ms-help://MS.MSDNQTR.2004JAN.1033/winui/winui/windowsuserinterface/userinput/VirtualKeyCodes.htm

  3. #3
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Wouldn't it be '0' and ')', not '0' and '!'?
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  4. #4
    Registered User
    Join Date
    Jun 2003
    Posts
    245
    Indeed it would. Oops!

  5. #5
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Actually it's dependent on the keyboard layout. On the typical German QWERTZ keyboard, it's '0' and '=' (and '}' too).

    The ToAscii function converts a vkey code to an ASCII code, but it also requires the complete keyboard state as input (for shift and other alternate-character functions).
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  6. #6
    Registered User
    Join Date
    Dec 2002
    Posts
    221
    thank you all very much

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Desperate Over Ecs!
    By cookie in forum C Programming
    Replies: 17
    Last Post: 07-16-2008, 01:25 PM
  2. Window message loop (Keys)
    By Blackroot in forum Windows Programming
    Replies: 3
    Last Post: 09-12-2006, 05:15 PM
  3. Scope And Parameter Passing
    By djwicks in forum C Programming
    Replies: 6
    Last Post: 03-28-2005, 08:26 PM
  4. Help, the window gets killed......
    By incognito in forum Game Programming
    Replies: 2
    Last Post: 05-28-2002, 02:22 PM