I'm trying to learn how GetAsyncKeyState works. With this code when escape is pressed it's suppose to break out of the loop, but it doesn't. Why not? In a GUI App would I put this in my message loop?
Code:#include <windows.h>
#include <stdio.h>
int main(void)
{
while(1)
{
if(GetAsyncKeyState(VK_ESCAPE))
{
break;
}
}
return 0;
}