Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Help on GetAsyncKeyState(...)

Help on GetAsyncKeyState(...)

Scheduled Pinned Locked Moved C / C++ / MFC
jsonhelptutorialquestion
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    Uday Janaswamy
    wrote on last edited by
    #1

    Hi all, How to Use GetAsyncKeyState(..) Api, Please provide a snippet of code. And what is the Difference between GetKeyState(...) and GetAsyncKeyState(...) uday.

    H S 2 Replies Last reply
    0
    • U Uday Janaswamy

      Hi all, How to Use GetAsyncKeyState(..) Api, Please provide a snippet of code. And what is the Difference between GetKeyState(...) and GetAsyncKeyState(...) uday.

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      See SHORT nState = GetAsyncKeyState(VK_TAB); BOOL bTab = (nState & 0x9000); if(bTab) MessageBox("A");_**


      **_

      whitesky


      U 1 Reply Last reply
      0
      • U Uday Janaswamy

        Hi all, How to Use GetAsyncKeyState(..) Api, Please provide a snippet of code. And what is the Difference between GetKeyState(...) and GetAsyncKeyState(...) uday.

        S Offline
        S Offline
        see me
        wrote on last edited by
        #3

        Hi,:-D The key status returned from GetKeyState function changes as a specified thread reads key messages from its message queue. The status does not reflect the interrupt-level state associated with the hardware. Use the GetAsyncKeyState function to retrieve that information. :) "Dream bigger...Do bigger...Expect smaller" aji

        1 Reply Last reply
        0
        • H Hamid Taebi

          See SHORT nState = GetAsyncKeyState(VK_TAB); BOOL bTab = (nState & 0x9000); if(bTab) MessageBox("A");_**


          **_

          whitesky


          U Offline
          U Offline
          Uday Janaswamy
          wrote on last edited by
          #4

          hi WhiteSky, I want to know which key i have entered. In the above example you supplied 0x9000 for tab Control. Tab-Control --> 0x9000. Shift-Control ---> ? Ctrl-Control ---> I want to know Shift-Control,Ctrl-Control Keys. please help me out. uday.

          F H 2 Replies Last reply
          0
          • U Uday Janaswamy

            hi WhiteSky, I want to know which key i have entered. In the above example you supplied 0x9000 for tab Control. Tab-Control --> 0x9000. Shift-Control ---> ? Ctrl-Control ---> I want to know Shift-Control,Ctrl-Control Keys. please help me out. uday.

            F Offline
            F Offline
            FarPointer
            wrote on last edited by
            #5

            Their is no need to know the hex values of the corssponding keys :- U can use the VK_ and the second one is the corssponding Hex value. VK_SHIFT 10 SHIFT key VK_CONTROL 11 CTRL key Regards, FarPointer Blog:FARPOINTER

            1 Reply Last reply
            0
            • U Uday Janaswamy

              hi WhiteSky, I want to know which key i have entered. In the above example you supplied 0x9000 for tab Control. Tab-Control --> 0x9000. Shift-Control ---> ? Ctrl-Control ---> I want to know Shift-Control,Ctrl-Control Keys. please help me out. uday.

              H Offline
              H Offline
              Hamid Taebi
              wrote on last edited by
              #6

              See Virtual-Key Codes in GetAsyncKeyState_**


              **_

              whitesky


              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups