Mouse XY Coordinates HELP!!!

I'm working on a project and I'm stuck because I have only know Visual C++ for 1 week, I need to create a program that asks the user which port is the mouse connected to, then is has to read the serial data from the mouse and display the XY coordinates on the program.

Aprecciate Anything .

Thank You.

Comments

  • SephirothSephiroth Fayetteville, NC, USA
    : I'm working on a project and I'm stuck because I have only know
    : Visual C++ for 1 week, I need to create a program that asks the user
    : which port is the mouse connected to, then is has to read the serial
    : data from the mouse and display the XY coordinates on the program.
    :
    : Aprecciate Anything .
    :
    : Thank You.
    :
    In Windows, especially anything in the last ten years, you generally won't find mice on ports, but connected via USB. Also in Windows you can ignore the whole port thing and simply catch the WM_MOUSEMOVE message in your window procedure. Whenever the WPARAM is WM_MOUSEMOVE, the low-order word of the LPARAM is the X position and the high-order word of the LPARAM is the Y position. If you need more information, look up "WM_MOUSEMOVE" on the MSDN.

    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion