As i am new to use mouse interface in c.

Please tell me how can we check mouse is connected or not.

How can we get co-ordinate from computer screen when we clicked it.

i just want that how can we store co-ordinate of screen in variable when we clicked on the screen.

Please reply as soon as possible.

Recommended Answers

All 5 Replies

what operating system and compiler?

Turbo c compiler and windows xp operating system

Well you had better use a different compiler becuse you can't access win32 api mouse functions from that 16-bit compiler. MS-Windows != MS-DOS.

This blog has some insights and input on win32 api and mouse interactions.

They still offer the Visual Studio 2008 C++ IDE as the express version (found on the right most tab)

I would rather suggest you apply layer of abstraction for sake of simplicity and may be future Xplatform, if it is not a homework. Jump yourself into wxWidgets,GTKmm, or QT
They really simplify things and abstract you from dirty calls to OS directly.

I hate LPVOID and some other ugly Win32 stuffs :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.