Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Contributions to C::B => Topic started by: husky83 on August 30, 2010, 11:39:28 am

Title: Mouse click simulate
Post by: husky83 on August 30, 2010, 11:39:28 am
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)); 
But I have a problem:
Quote
D:\CodeBlocks\Kliker\main.cpp|81|error: 'INPUT' was not declared in this scope|
I have include windows.h

Any solution?
Title: Re: Mouse click simulate
Post by: Jenna on August 30, 2010, 11:44:22 am
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 !