Author Topic: Mouse click simulate  (Read 7976 times)

husky83

  • Guest
Mouse click simulate
« 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?

Offline Jenna

  • 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 !