xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam); bool find(xPos,yPos);
Now you will get the x and y position of the mouse pointer in the coordinate. xPos and yPos should be long:
bool find(long x,long y);
Inside, check if xPos and yPos fall under any object in the screen coordinate.
source share