Thread: GetAsyncKeyState() won't work properly!

  1. #1
    Programming is fun, mkay?
    Join Date
    Oct 2001
    Posts
    490

    Question GetAsyncKeyState() won't work properly!

    Well, I can't figure it out. I have the array of char from A - Z like this:

    char vkBuffer[26] = { // Keys here };

    I am just making a simple keylogger, but it's not for a hacking reason. I was just playing with it. Anyhow, where do I keep a loop while my program is running and get all the keys into an EDIT box. I have the loop in the Message Loop, but it doesn't receive the keys in order. If I push S, D, and then F, it appears like this:

    DSF

    Any help?

  2. #2
    Registered User
    Join Date
    Feb 2002
    Posts
    589
    GetAsyncKeyState don't wait for the message loop and that might cause some weird behaviour from time to time. I usally but it in a while(true) loop but that wouldn't be good practice if you want to run it in the background

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C++ system("rm") not deleting properly?
    By fattysmo in forum C++ Programming
    Replies: 4
    Last Post: 05-17-2008, 11:37 AM
  2. terminal output not showing output properly
    By stanlvw in forum C Programming
    Replies: 13
    Last Post: 11-19-2007, 10:46 PM
  3. How to make to scrollbars work?
    By vopo in forum Windows Programming
    Replies: 2
    Last Post: 11-04-2007, 03:07 PM
  4. Expression Manipulator v0.4 (bugs fixed, derivatives work with trig funcs)
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 06-08-2003, 08:10 AM
  5. help getting program to work
    By jlmac2001 in forum C Programming
    Replies: 2
    Last Post: 11-13-2002, 11:04 PM