Author Topic: Mouse click simulate  (Read 3842 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: [Select]
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 jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
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 !