I want to write a program to detect when my laptop's mouse is connected/disconnected but I don't know if there's any events called when a USB device is plugged in or maybe it's something else?

I'd also like to know whether it's possible to tell what device the mouse input has came from?

I've googled but to no avail.
I did find out that devices either use there own APIs or standard Microsoft ones but that's all :P

get dev-c++ and it has a usb library built in.

it's in the include folder.

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.