Re: Moving Mouse

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



And had you posted all of the original code, we could have told you that.


--
Chris Tacke
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--




"Wagner Bertolini Junior" <wagnerbertolini@xxxxxxxxxxxxxxxxxx> wrote in
message news:uYB$mwbNHHA.4928@xxxxxxxxxxxxxxxxxxxxxxx
Answer to THIS and ANOTHER post (Moving Mouse)

Ohhh god!!

high level mind problem!!!

I found the problem!

I just declared the p/invoke like that:
[DllImport("coredll.dll")]
public static extern void mouse_event(long flags, long x, long y, long
data,
long extraInfo);

it works, but the first parameter is a flag!!! Of course, we need to
do BITWISE compare to choice!
THE DECLARATION IS WRONG!!



CORRECT:

[DllImport("coredll.dll")]
public static extern void mouse_event(int flags, int x, int y, int data,
int
extraInfo);

Or BETTER :

[DllImport("coredll.dll")]
public static extern void mouse_event(MOUSEEVENTF flags, int x, int y, int
data, int extraInfo);

public enum MOUSEEVENTF
{
MOVE = 0x1, /* mouse move */
LEFTDOWN = 0x2, /* left button down */
LEFTUP = 0x4, /*left button up */
RIGHTDOWN = 0x8, /*right button down */
RIGHTUP = 0x10, /*right button up */
MIDDLEDOWN = 0x20, /*middle button down */
MIDDLEUP = 0x40, /* middle button up */
WHEEL = 0x800, /*wheel button rolled */
VIRTUALDESK = 0x4000, /* map to entrire virtual desktop */
ABSOLUTE = 0x8000, /* absolute move */
TOUCH = 0x100000, /* absolute move */
}


Thanks to all!!



"Wagner Bertolini Junior" <wagnerbertolini@xxxxxxxxxxxxxxxxxx> escreveu na
mensagem news:69D5C97F-7467-4854-9346-5090A5877A82@xxxxxxxxxxxxxxxx
Can anyone help on this?

i´m not agreeing with documentation about mouse moves and screen. at the
documentation of windows CE they talk about an absolute range 0 to 65535.
But
when i try to send a click in certainly coordinates it does on the Axis-X
=
0, at the extreme left, always. If i send (32000, 32000) the click
appears to
be done on
(0, 32000). i cant´understand it.

I´m working with windows ce 5.0.





.



Relevant Pages

  • [PATCH] riscom8: Coding style
    ... unsigned long flags; ... unsigned char val1, val2; ... struct riscom_port *port; ...
    (Linux-Kernel)
  • perfmon3 interface overview
    ... words redesign of the perfmon2 syscall API. ... Each syscall has a flags parameters which allows the syscalls to be ... int pfm_create_session; ... It is located in the perfmon3 branch. ...
    (Linux-Kernel)
  • [PATCH 03/18] flag parameters: paccept
    ... This syscall differs from accept in that it adds ... The flags parameter can be used to set flag like SOCK_CLOEXEC. ... we really want the signal mask ... handler (int s) ...
    (Linux-Kernel)
  • [PATCH 02/18] flag parameters: paccept
    ... This syscall differs from accept in that it adds ... The flags parameter can be used to set flag like SOCK_CLOEXEC. ... we really want the signal mask ... handler (int s) ...
    (Linux-Kernel)
  • [PATCH] esp: Clean up to modern coding style
    ... set_serial_info fixed to set the flags, custom divisor, and uart ... +static void program_isa_dma(int dma, int dir, unsigned long addr, int len) ... This routine will shutdown a serial port; ...
    (Linux-Kernel)