Author Topic: Mouse click simulate  (Read 4767 times)


  • Guest
Mouse click simulate
« on: August 30, 2010, 11:39:28 am »
I want to simulate mouse click (left). I found this code:
Code: [Select]
ZeroMemory (&Klik, sizeof(INPUT));
Klik.type = INPUT_MOUSE; 
Klik.mi.dwFlags = MOUSEEVENTF_LEFTDOWN;     
SendInput (1, &Klik, sizeof(INPUT)); 
But I have a problem:
D:\CodeBlocks\Kliker\main.cpp|81|error: 'INPUT' was not declared in this scope|
I have include windows.h

Any solution?

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Mouse click simulate
« Reply #1 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 !