detecting keystrokes
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: detecting keystrokes

  1. #1
    Join Date
    Dec 2010
    Posts
    9

    detecting keystrokes

    is there any other way to detect key strokes than in this function
    Code:
    LRESULT CALLBACK MainProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
          switch (message)
                case WM_KEYDOWN:
    i tried directinput but this:
    Code:
    if(inputkeyboard->GetDeviceState(256, &keystate) == DI_OK)
    		if(keystate[DIK_ESCAPE] & 0x80)
    works as GetAsyncKeyState, and i need to detect only one stroke

  2. #2
    Join Date
    Dec 2010
    Posts
    9

    Re: detecting keystrokes

    i figure out GetKeyboardStateand get GetKeyState functions, im using loword to get "the key is toggled", it works but i would like to know what methods professional developers use (im building a "game" )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center