GetAsyncKeyState Problem

This is a discussion on GetAsyncKeyState Problem within the C++ Programming forums, part of the General Programming Boards category; Problem with GetAsyncKeyState. Code: if(GetAsyncKeyState(0x57)) { if(TotalInputChar <= TextMaxChar) { SetConsoleCursorPosition(Output, pos); cout <<"W"; TextStartX++; TotalInputChar++; } } In a ...

  1. #1
    deletedforumuser
    Guest

    GetAsyncKeyState Problem

    Problem with GetAsyncKeyState.

    Code:
    if(GetAsyncKeyState(0x57))
    		{
    			if(TotalInputChar <= TextMaxChar)
    			{
    				SetConsoleCursorPosition(Output, pos);
    				cout <<"W";
    				TextStartX++;
    				TotalInputChar++;
    			}
    		}
    In a while loop...it will print W many times...how to make it check if W is still pressed?

  2. #2
    deletedforumuser
    Guest
    Found out the problem. Nevermind

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  2. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 09:38 AM
  3. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 03:51 PM
  4. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 07:54 PM
  5. beginner problem
    By The_Nymph in forum C Programming
    Replies: 4
    Last Post: 03-05-2002, 05:46 PM

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