Consider the sprite to be a box. You need to figure out if the mouse cursor is inside the box, so you determine if the mouse's X coordinate is greater than the sprite's X coordinate, but also less than the sprite's X coordinate + the sprite's width. The same goes for the Y coordinates, but they deal with height.
(x, y) + width
.---------------.
| |
| |
| |
.---------------.
+ height
int mX = dbMouseX(),
mY = dbMouseY(),
sX = dbSpriteX(SPRITE),
sY = dbSpriteY(SPRITE),
sW = dbSpriteWidth(SPRITE),
sH = dbSpriteHeight(SPRITE); // Variables just for the ease of reading/understanding
if(mX > sX && mx < sX + sW && my > sY && my < sY + sH)
// Hovering directly over sprite
EDIT: Aww, the picture looked so much better in the forum message box...
Top left of sprite = (x, y)
Top to bottom = y + height
Left to right side = x + width
Success = Determination * Mood;