Przeczytałem na stronce coś takiego:
If the function fails (if the current thread does not have the input focus), the function returns 0. If the &H8000 bit of the return value is set, the key has been pressed at least once since the last time the thread called GetAsyncKeyState. If the &H1 bit of the return value is set, the key is currently pressed down.
Zakodziłem coś takiego:
if(!(GetAsyncKeyState('A') & 0x8000) && (GetAsyncKeyState('A') & 0x01))
{
MessageBox(0, "działa", "" , MB_OK);
}
Mój kod rozumiem tak: jeżeli (klawisz A nie był wciśnięty wcześniej i i jest naciśnięty teraz) to zrób {}
Co jest źle ??