0

I am currently working on a Win32 program where I have a picture. Depending where they click on the picture, something will happen.I just loaded the picture on the window, but how do I make it so that my program can tell when a certain area on the picture on the window is clicked? Thanks in advance.

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by Ancient Dragon
0

You have to capture mouse events, which will give you the x and y coordinates of the mouse. Then just test those coordinates against the area of the window you are interested in to see if the mouse clicked inside or outside the rectangle.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.