I have a program display a shape of rectangle, and i want add another features which is it accepts input from the mouse and if right clicks the mouse, with the mouse over the rectangle, will turn the rectangle into a diamond.
Which part are you having problems with?
What have you tried so far, and what was the result or error produced?
What references have you read? What URL did you follow in Google?
here i am sending you a simpler tutorial on callback events.
hope this will help you.
NOTE: ignore point # 4
ok, i know how to solve my problem, but now i’m confuse with the mouse motion event handler, as i know the function is
void mouseMotion (int x, int y)
but what i’m not understand is what i need to set inside the function when the shape is being move as i know the position are the main consideration into.