1 registered members (AndrewAMD),
718
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
New, delete, and windows.h [RESOLVED *yes!*]
#349894
12/12/10 00:08
12/12/10 00:08
|
Joined: Dec 2008
Posts: 528 Wagga, Australia
the_mehmaster
OP
User
|
OP
User
Joined: Dec 2008
Posts: 528
Wagga, Australia
|
Hey there, The following code works and is compiling properly in VS 2010 -- But my problem is that I would like to get it working in lite-c... I'm not really sure where to start though, as lite-c does not support or have a lot of what I am using.. I don't think lite-c has the 'new' or 'delete' operators (Which I am using inefficiently, but I need them none the less). Also, many of the structs are not defined in windows.h.. along with the the integral function 'SendInput'.. How would I go about this task? any help is greatly appreciated
#include <windows.h>
void mouseMove(int dx, int dy)
{
INPUT* input = new INPUT;
input->type = INPUT_MOUSE;
input->mi.dx = dx;
input->mi.dy = dy;
input->mi.mouseData = 0;
input->mi.dwFlags = MOUSEEVENTF_MOVE;
input->mi.time = 0;
input->mi.dwExtraInfo = 0;
SendInput(1, input, sizeof(INPUT));
delete input;
}
int main(int argc, _TCHAR* argv[])
{
while(1)
{
mouseMove(4,0);
mouseMove(0,4);
mouseMove(-4,0);
mouseMove(0,-4);
}
return 0;
}
Some links: SendInput A forum post (3rd last post on that page) Thanks in advance...
Last edited by the_mehmaster; 12/15/10 04:39.
|
|
|
Entire Thread
|
New, delete, and windows.h [RESOLVED *yes!*]
|
the_mehmaster
|
12/12/10 00:08
|
Re: New, delete, and windows.h
|
MasterQ32
|
12/12/10 00:12
|
Re: New, delete, and windows.h
|
the_mehmaster
|
12/12/10 00:20
|
Re: New, delete, and windows.h
|
the_mehmaster
|
12/12/10 07:18
|
Re: New, delete, and windows.h
|
MasterQ32
|
12/14/10 15:42
|
Re: New, delete, and windows.h
|
the_mehmaster
|
12/15/10 03:32
|
Re: New, delete, and windows.h
|
the_mehmaster
|
12/15/10 04:20
|
Re: New, delete, and windows.h
|
the_mehmaster
|
12/15/10 04:24
|
Re: New, delete, and windows.h
|
the_mehmaster
|
12/15/10 04:38
|
Re: New, delete, and windows.h
|
gri
|
12/15/10 06:40
|
Re: New, delete, and windows.h
|
EvilSOB
|
12/15/10 09:00
|
Re: New, delete, and windows.h
|
the_mehmaster
|
12/15/10 10:22
|
Re: New, delete, and windows.h
|
EvilSOB
|
12/15/10 11:20
|
Re: New, delete, and windows.h
|
WretchedSid
|
12/15/10 12:20
|
Re: New, delete, and windows.h
|
the_mehmaster
|
12/15/10 20:53
|
|
|