bool space = false;
if (GetAsyncKeyState(XButton1) < 0 && space == false)
{
space = true;
MessageBox(NULL, "Down", _T("down"), MB_OK);
}
if (GetAsyncKeyState(XButton1) == 0 && space == true)
{
space = false;
MessageBox(NULL, "Up", _T("up"), MB_OK);
}