PDA

View Full Version : [HELP]mouse clicking over to change shape



noobprogrammer89
11-10-2011, 08:36 PM
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.

BionicBytes
11-11-2011, 06:25 AM
yes and....
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?

blackzero
11-11-2011, 11:20 PM
here i am sending you a simpler tutorial on callback events.
hope this will help you.

http://www.filefactory.com/file/cffa3f6/n/Lab_03_Callbacks_2011.pdf

NOTE: ignore point # 4

noobprogrammer89
11-13-2011, 12:51 AM
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.