When VK_LBUTTON is not pressed

Hello, so i'm a beginner in c++ and i want to know how can i go this:
"When VK_LBUTTON is not held, then is test = true;"

 
"When VK_LBUTTON is not held, then is test = true;"


i maked when he is pressed
 
if(GetAsyncKeyState(VK_LBUTTON) && enabled)


i tried
 
if(GetAsyncKeyState(!VK_LBUTTON)

but its not working lol
Last edited on
Try:

1
2
3
4
5
6
7
8
9
10
bool lbutton_down()
{
    return bool(GetAsyncKeyState(VK_LBUTTON) & 0x8000); // test if high bit is set
}


// ...

    if (!lbutton_down())
        ; // lbutton is up 

Topic archived. No new replies allowed.