I'm using Win32 and Direct2D and I need to know when the mouse is over something so I can move/rotate it only when the mouse is over it and is down.

I know how to rotate/move stuff with the mouse and how to tell when the mouse is down and up, all I need to know is when it's over something, like a simple square or circle.

Could someone tell me how that is done?