tags:

views:

180

answers:

7
void LeftClick ( )
{  
  INPUT    Input={0};
  // left down 
  Input.type      = INPUT_MOUSE;
  Input.mi.dwFlags  = MOUSEEVENTF_LEFTDOWN;
  ::SendInput(1,&Input,sizeof(INPUT));

  // left up
  ::ZeroMemory(&Input,sizeof(INPUT));
  Input.type      = INPUT_MOUSE;
  Input.mi.dwFlags  = MOUSEEVENTF_LEFTUP;
  ::SendInput(1,&Input,sizeof(INPUT));
}
+4  A: 

From the look of it, I'd say C (or C++).

Chaoz
Probably C++, as C doesn't have the `::` operator.
mipadi
+4  A: 

That looks like C++

sepp2k
+2  A: 

Looks like C++ (the :: and the void type give it away)

Traveling Tech Guy
+1  A: 

That looks like C++

baeltazor
A: 

My guess, C++ against the Win32 API. The {0} doesn't make any sense though.

Shaun
{0} makes perfect sense.
Yossarian
{0} is a way to initialize all members of a struct to 0. See http://www.cplusplus.com/forum/general/10941/
chollida
Thanks. Didn't know that. 15 years of C++ and I still haven't touch all its features :)
Shaun
A: 

Yup, that's C++

+1  A: 

I'd guess C++. I can't believe nobody else has come up with that yet! :)

Gavin Schultz-Ohkubo
lol
baeltazor