Developer forums (C::B DEVELOPMENT STRICTLY!) > Contributions to C::B

Mouse click simulate

(1/1)

husky83:
I want to simulate mouse click (left). I found this code:

--- Code: ---INPUT Klik;
ZeroMemory (&Klik, sizeof(INPUT));
Klik.type = INPUT_MOUSE; 
Klik.mi.dwFlags = MOUSEEVENTF_LEFTDOWN;     
SendInput (1, &Klik, sizeof(INPUT)); 
--- End code ---
But I have a problem:

--- Quote ---D:\CodeBlocks\Kliker\main.cpp|81|error: 'INPUT' was not declared in this scope|
--- End quote ---
I have include windows.h

Any solution?

Jenna:
The question is not related to C::B and therfore violating our forum rules.

Please ask in an appropriate (C-/C++-forum) forum.

Topic locked !

Navigation

[0] Message Index

Go to full version